MySQL new password encryption not supported?

MySQL new password encryption not supported?

Postby Jeff » Tue 22 Feb 2005 20:32

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
Jeff
 

Postby Serious » Wed 23 Feb 2005 10:06

MySqlDirect .NET has not tested yet with MySql Server v4.1.9.
We plan to perform testing in near future.
Serious
 

Postby Serious » Thu 24 Feb 2005 15:57

We have tested our product with MySQL Server v4.1.9 and found no problems with database management in DbTools Addin.
If you get an autorization error, check whether you specify "Database" property in "Database Connection Properties" dialog box.
Serious
 

Clearify the problem

Postby Jeff » Fri 25 Feb 2005 12:48

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
Jeff
 

Postby Serious » Fri 25 Feb 2005 16:13

Check if your user has sufficient privileges to to execute SHOW DATABASES command.
Serious
 

support

Postby Jeff » Fri 25 Feb 2005 19:54

yes, the user has permissions, it happens with root, and i don't have to change permissions for this to work, I only have to reset the password using the old_password function. are you having trouble creating this problem on your side?

Jeff
Jeff
 

Postby Serious » Mon 28 Feb 2005 13:11

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.
Serious
 

Postby Guest » Mon 28 Feb 2005 18:49

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
Guest
 

Postby Serious » Tue 01 Mar 2005 13:34

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:
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");
Serious
 

Still having problems

Postby Jeff » Wed 25 May 2005 14:27

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
 

Postby Serious » Thu 26 May 2005 08:43

This seems to be a your configuration problem. Maybe you have migrated from an older version of MySQL. If this is the case, try working with clean install of MySQL 4.1.
Serious
 

Still problems

Postby Jeff » Fri 27 May 2005 00:58

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
 

Postby Serious » Tue 31 May 2005 07:27

Do you use latest version of MySQLDirect .NET?
Serious
 


Return to dotConnect for MySQL