accessing a mysql server version 4.1.16
Posted by julian (julian), 11 January 2006I have installed a new mysql server on an XP operating system. i choose the win 32 zip file. I installed it sucessfully , but during the installation the program asked for a root pass word, so I gave it one.
it also asked for a mySQL.com sign up e mail address and password, so I gave it these also.
The server runs fine ( as a window service) so it automatically starts when the machine boots.
I am running this as a test server, not a production server, and am initially connecting to it using root ( I know this is not recommended in a live production environment).
1. I expected the server to install with the pass word for the root user being blank!? i.e. nothing in it, so was confussed when the program asked for one..... but it is ok I can of course use the one I gave it.
2. but when in php I go to connect to the server using :
$conn = mysql_connect("localhost","root","sheba") or die(mysql_error());
get warning mysql_connect(); client does not support authentication protocol requested by server, consider upgrading my sql client in C:................. .......... lineXX
I have installed a similar version of mysql on another XP machine without this problem!!
I have two questions.
a. how best can I configure the mysql server so that it does not complain when I connect to it??
b. The live mysql server that is on the actual production web server I will be using for the real web site live is using mysql ver 3.23.49 at mo, so I really want to write calls to the mysql server in my code that will work without problems both on my testing server and in the live web server.
i suspect thet solving a will probably solve b.
I have looked on open talk and on the mysql site and it seems there are a number of possible fixes... is the best one to put in a parameter into the start up of the mysql server?? ..... that is in the control panel | admin tools | services, find the mysql service and open it and type in a parameter....... or will the box be greyed out...
Any help of suggestions would be appreciated. many thanks in advance . Julian
I am certain that mysql ver 3.23.49 will not ask for an authentication protocol!!!
Posted by admin (Graham Ellis), 12 January 2006On your new server, use the OLD_PASSWORD function so set up an old-style password for any logins that you wish to be accessible from the older client programs. For example:
SET PASSWORD FOR "root"@"localhost" = OLD_PASSWORD("sheba") ;
You'll then be able to connect to this in just the same way as you could connect to a 3.23 server.
Note for other readersJulian is talking about a local test server, so the increased security at 4.1.x and 5.x isn't an issue. In an exposed situation, I would be suggesting some account other than the database admin account be used, and a more secure password chosen too!
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: firstname.lastname@example.org • WEB: http://www.wellho.net • SKYPE: wellho