MySQL new password encryption not supported?
MySQL new password encryption not supported?
I am using a fresh OS install with only mysql 4.1.9 installed on win2k. If I try to use the DBexplorer from my development machine and add the database, I get an authorization error. If I then enter the line on the mysql server:
mysql> SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
it works. does MySQLDirect.NET not support he new password encryption standard in MySQL? if I am doing something wrong, please let me know. If I am correct, do you have a timeline on when this will be fixed?
Thanks,
Jeff
mysql> SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
it works. does MySQLDirect.NET not support he new password encryption standard in MySQL? if I am doing something wrong, please let me know. If I am correct, do you have a timeline on when this will be fixed?
Thanks,
Jeff
Clearify the problem
After playing around with this a little more, I was able to narrow down the problem. The show databases command does not work within MySQL Direct.NET with the new password type on MySQL Server 4.1.9. I performed the following test:
Created a fresh win2k server(what would I do without VMWare?) with a fresh MySQL Server 4.1.9 installation. I opened DBExplorer and tried to login with the user root, and the password pass. And click on the dropdown. Nothing.. I then added the database blah on the server and DBExplorer manually, and clicked test. It worked(I just about crapped my pants at this point). But I still couldn't get the databases in the dropdown box. So I then used that line above and just clicked the dropdown button and they then appeared.
Now I went back to my code to find where I was getting these errors and it just so happened that I was doing a show databases command where I was getting an authorization error.
I guess I will change my code for now, but this should probably be fixed as well. I hope this helps.
Cheers,
Jeff
Created a fresh win2k server(what would I do without VMWare?) with a fresh MySQL Server 4.1.9 installation. I opened DBExplorer and tried to login with the user root, and the password pass. And click on the dropdown. Nothing.. I then added the database blah on the server and DBExplorer manually, and clicked test. It worked(I just about crapped my pants at this point). But I still couldn't get the databases in the dropdown box. So I then used that line above and just clicked the dropdown button and they then appeared.
Now I went back to my code to find where I was getting these errors and it just so happened that I was doing a show databases command where I was getting an authorization error.
I guess I will change my code for now, but this should probably be fixed as well. I hope this helps.
Cheers,
Jeff
MySQLDirect .NET provides correct authentification on MySQL server v4.1.9. This functionality was tested and used many times.
New password encryption functions are used only with authentification. If you use query like "SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd');" MySQlDirect .NET sends your sql without any transformations.
New password encryption functions are used only with authentification. If you use query like "SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd');" MySQlDirect .NET sends your sql without any transformations.
hmm.. maybe I didn't make myself clear. I am having problems with the show database function... it does not show the databases with a newly created user or the user root on a new install. Then after I sit on the console of the server and issue the command : "SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd');". it works. I do not issue this command through MySQLDirect.NET.
Jeff
Jeff
1. If you have problems with "Database Connection Properties" dialog in DbExplorer, please follow the instructions:
1) Press "Add new connection" button in the DbExplorer window.
2) Specify host, port, user name, password, database name.
3) Press "Test connection" button.
4) If connection sucessful, close "Database Connection Properties" with "Close" button.
Else, check data which you specified in point 3.
"Databases" listbox is not working properly on closed connection. To use it select "Modify connection" item in the connection context menu in DbExplorer (connection must be opened before).
2. If you have problems with "select databases" command in MySQLDirect .NET, try to use this code:
1) Press "Add new connection" button in the DbExplorer window.
2) Specify host, port, user name, password, database name.
3) Press "Test connection" button.
4) If connection sucessful, close "Database Connection Properties" with "Close" button.
Else, check data which you specified in point 3.
"Databases" listbox is not working properly on closed connection. To use it select "Modify connection" item in the connection context menu in DbExplorer (connection must be opened before).
2. If you have problems with "select databases" command in MySQLDirect .NET, try to use this code:
Code: Select all
MySqlConnection connection = new MySqlConnection("host=olegy;database=test;user id=root;password=test;");
MySqlCommand cmd = new MySqlCommand("show databases", connection);
connection.Open();
try
{
using (MySqlDataReader r = cmd.ExecuteReader())
{
while (r.Read())
Console.WriteLine(r.GetString(0));
}
}
finally
{
connection.Close();
}
Console.WriteLine("ok");
Still having problems
Does anyone else have this problem? I continueosly see this happening. I can't use MySQLDirect .Net with MySQL 4.1.9+ unless I set the password to the old_password format. I have tried this with the database residing on Linux and Windows. It seems like I continusly have problems until I set the password to the old format and then I have no problems at all.
Jeff
Jeff
Still problems
Actually I have installed multiple versions of MySQL on multiple OS's and always have the same problem. My customers also have the same problem, so I don't think it is my DB. Also.... at no time are MySQL users modified from within the app and these problems occur before the user has ever logged into the MySQL server. It is a fresh install with nothing done except for installation of MySQL. Then as soon as I change the password to the old format from the command line MySQL client... it works perfectly every time.
Jeff
Jeff