MySQL 4.1 Passwords - mysql

I am connecting to a MySQL database with Visual Basic.net and am getting this error:
Authentication with old password no longer supported, use 4.1 style password
I have the following SQL code to fix this problem, where canningi_cdtest is the name of the user I wish to change the password for and testpass is the password I would like:
SET SESSION old_passwords=0;
SET PASSWORD FOR canningi_cdtest=PASSWORD('testpass');
This is the error I am getting:
#1044 - Access denied for user 'canningi'#'localhost' to database 'mysql'
What do I need to do?
EDIT
I have run the following code, with no errors:
SET PASSWORD = PASSWORD('my_password');
But when I now try and connect to the database, I am still getting the error:
Authentication with old password no longer supported, use 4.1 style password
How can I connect to an SQL database with a 4.1 password? Do I need to update cPanel? My version is 11.32.4 (build 15).

I just solved my problem just like this.
1) Connect to the db with mysql workbench (select the "use old auth" and "send pass in cleartext"
2) Using the workbench, run:
SET SESSION old_passwords=0;
SET PASSWORD FOR canningi_cdtest=PASSWORD('testpass');
3) Now go back to your app and it should run...
That is how I did it at least. I am using IX mysql and they do use old auth on their server so you must do something on your end...

Related

Access denied for user error during install phpmyadmin

I want to install phpmyadmin on Ubuntu 20.04. I take the password 2 times (first I tryed root password but after I tryed leave the field empty or use other password). Any time I error like screen of my error. I found this tutorial.
Author of this article wrote:
From the prompt, run the following command to disable the Validate
Password component. Note that this won’t actually uninstall it, but
just stop the component from being loaded on your MySQL server:
But this component is disable and yet I still have this error. How can I solve my problem
The error message you posted is different from the Validate Password one in the tutorial. I suggest re-enabling the option that you disabled.
Your error is showing that you (or someone) has changed the password of the MySQL user that Ubuntu (and Debian) uses for administrative purposes (debian-sys-maint). Details of that user are documented in README.Debian and the password is stored on disk in /etc/mysql/debian.cnf.
To resolve this, you can simply set the password to a known value and edit the configuration file to tell your system the new password.
Presumably, you're using MySQL 8.0.20, in which case you would connect through the command line client (mysql -u root -p) and run a command like this: ALTER USER 'debian-sys-maint'#'localhost' IDENTIFIED BY 'aReallyComplexPassword';.
On the chance that you're using MariaDB, the command is SET PASSWORD FOR 'root'#'localhost' = PASSWORD('aReallyComplexPassword');.
You won't need the password again after you put it in /etc/mysql/debian.cnf). Note that you'll need to edit the debian.cnf file as root or sudo.

mysql can be connect locally but only remotely

I have a tomcat 8 webserver and try to connect local mysql 5.7, but having following error:
Caused by:
SQLNestedException: Cannot create PoolableConnectionFactory (Client does not support authentication protocol requested by server
I googled and people suggested to update the password and I did as well, however doesn't work for me.
What I did
ALTER USER 'root'#'localhost' IDENTIFIED WITH mysql_native_password BY 'password'
flush privileges;
Currently I can only use public ip address to connect back to the local database....
MYSQL changed the password storage method starting with version 4.1. If your client is trying to connect with the old way and the server has the password stored in the new way, then you will get that error message. In order to fix that, you have 2 choices:
check the settings on your tomcat server
change the password hash in the mysql server, to be compatible with versions pre-4.1
If you want to change the password to use the old hashing type, use a command like:
mysql> SET PASSWORD FOR
-> 'some_user'#'some_host' = OLD_PASSWORD('new_password');
After that you have to start your mysql server with old_passwords system variable set to 1
On the other hand, I think that the best way of resolving this will be to set the client to use the proper way of connecting to the mysql server.
If you use PHP for connecting to the server, check if you use mysql of mysqli library. I think that only mysqli library uses the new way of managing connections.

phpMyAdmin login information?

I am trying to view my database by using phpMyAdmin. I was wondering where I can find out the server name that should be inputted into the form? I believe my username and password should be what I use when I access MySQL from the command line. Thanks
UPDATE: Tried local host and 127.0.0.1 and got this error:
If you still can connect using the CLI mysql on the server console you can use the command below to see which account and host name you are able to use:
select * from mysql.user;
Eventually you can define a new sysadmin with password to be used with php as described at
https://corpocrat.com/2008/09/28/how-to-create-new-user-for-phpmyadmin-login/

WebMatrix error "The specified password for user account 'root' is not valid...."

When creating a new Joomla, Drupal or any website involving a database from the 'App Gallery', I get the errors:
MySQL
"The specified password for user account 'root' is not valid, or failed to connect to the database server"
SQL Server
"The specified password for user account 'sa' is not valid, or failed to connect to the database server"
What can be done to stop this error occurring? I don't believe it's with the databases, I blame WebMatrix because it's the same problem for both DBs.
Thanks in advance
I had the same problem and i performed the below steps to resolve the issue:
Open Sql Server Management Studio as Administartor
Login to .\SQLEXPRESS using Windows Authentication
Go to Security Tab -- > Logins --> Change the "sa" password and Press Ok
Use the newly created Password in WebMatrix and you should be all Set.
In the case of SQL Server, I think the default database is the .\SQLExpress when you using WebMatrix to install Joomla, so the "sa" is the user of .\SQLExpress. You should check the password for that.
I followed the directions here:http://www.microsoft.com/web/post/understanding-mysql-errors-when-installing-web-apps-in-webmatrix and it fixed this issue.
You need to not only uninstall MySQL, put also delete the folder \ProgramData\MySQL
as the password details are cached there.
For MySQL problem: Follow these steps to reset the root password.
Stop the MySQL server if it is running.
Create a text file containing the new password and save to a place. The content is: ALTER USER 'root'#'localhost' IDENTIFIED BY 'MyNewPass';
Start the MySQL Client Command Line by using cmd, then input
C:> cd "C:\Program Files\MySQL\MySQL Server 5.7\bin"
C:> mysqld --init-file=C:\mysql-init.txt
After the server has started successfully, delete the text file.
Now you can use the new password that you provided above to continue the installation of Web Platform Installer.
References: http://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html.

phpmyadmin is denying me access when I try and use it through http://localhost/xampp homepage

I am using a mac laptop running mac os x version 10.5.8 and I need to export a database to an .sql file so I can push it to github for a project. However when I attempt to use phpmyadmin for this through the localhost homepage, when I click on the link it responds with a page with just this error message:
MySQL said:
1045 - Access denied for user 'root'#'localhost' (using password: NO)
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
But it doesn't even prompt you for user information to begin with? is there something I am missing? someone please help
The problem is in your phpmyadmin configuration on the server.
You can see the documentation here: http://www.phpmyadmin.net/documentation/#setup_script
The setting you are looking for is "$cfg['Servers'][$i]['auth_type']" - set this to 'HTTP', and you will be able to input a username and password.
To resolve the above error:-
a) Open Mysql console from the tray of WAMP server
b) It will ask for password(you might have set this password earlier when u installed MySql in your system)(In my case it is admin)
c) Enter admin (press enter)
Now it means your phpmyadmin is assuming no password for your MySql and unable to connect MySql but yor are able to connect your MySql Server by providing password
For this Open config.inc file from the below path
C:\wamp\apps\phpmyadmin4.1.14
And replace this line
$cfg['Servers'][$i]['password'] =’ ’;
to `$cfg['Servers'][$i]['password'] = 'admin';
I hope it will work..
Turn off your Firewall and then connect to phpmyadmin. It should open. Then turn on Firewall again. Worked for me.