I am trying to get MySQL (4.1) installed on Windows XP. I already have Apache and PHP installed. This is just for me to play arround with scripts and stuff. Now I got it installed and everything and I am trying to connect to the database and it gives me this error:

Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in c:\server\htdocs\mod.php on line 3

I downloaded a program called SQL Maestro and that can connect to the database. What do I need to do to fix this. I know little to nothing about installing mysql and workings with apache and stuff. Thank you in advance.

    Find my.ini, usually in the directory where you installed it and in the section for mysqld add the line

    old-passwords

    If you've already created an admin user then go in and change all the passwords with updates

    use mysql;
    update user set password = old_password('whateveryyourpasswordis') where user = 'whoiam';

    It uses larger password hashes now that aren't supported by older APIs and it's causing lots of aggro.

    Oh, and you'll have to restart the service after you've done the edit

      Well thank you, but I can not find the mysqld section so I do not know where to add

      old-passwords.

      I did the second thing though do you have to have something running in order for mysql to work like you do with apache to have php working?

         Josh

        In your my.ini have you got a server section looking something like this:

        # SERVER SECTION
        # ----------------------------------------------------------------------
        #
        # The following options will be read by the MySQL Server. Make sure that
        # you have installed the server correctly (see above) so it reads this 
        # file.
        #
        [mysqld]
        
        old_passwords # this or old-passwords seems to work
        
        # The TCP/IP Port the MySQL Server will listen on
        port=3306
        
        #Path to installation directory. All paths are usually resolved relative to this.
        basedir=D:/mysql/
        
        #Path to the database root
        datadir=D:/mysql/Data/

        That's from my own my.ini file. If it isn't there just try throwing it in anywhere.

        Mysql should be running as a service if you used the installer. First do ctrl-alt-delete to get the task manager up and see if mysqld-nt.exe is there as a process.

        To restart it go to services (control panel -> Administrative tools -> component services) and have a look for mysql41.

        Easy way to test if it's worked is to do

        SELECT PASSWORD('foo'), OLD_PASSWORD('foo');

        and see if they're both the same, and the first one isn't huuuge.

          Well I got it to work with the code that you gave me so thank you for that. I did not find the mmysql41 in the administrative tools however mysql does work.

            Write a Reply...