Posts Tagged ‘Mysql’

After Upgrading mysql to 5.1 , you will receive following error.

“Client does not support authentication protocol requested by server; consider upgrading MySQL client.”

The above error message are receiving because latest version of MySql uses a new format for the password in that case to use older client to use older version Mysql with new version Mysql you have to set the passwords on the server to their old format.Refer following steps to set the password.

Cause of the error is the latest version of mysql is using new format for the password. You will have to make following chnages so that mysql will use old password format.

Login into shell as root user and access mysql with root user and password

[root@server]#mysql -u root -p

Then, copy and paste the following command in shell, editing commands if necessary, to change the password of the user to the old format.

[root@server]#UPDATE mysql.user
[root@server]#SET password=OLD_PASSWORD(‘password’)
[root@server]#WHERE user=’username’
[root@server]#AND host=’host';

After running above commands flush the tables using following command.

[root@server]#flush privileges;

Then exit the mysql client.

[root@server]#\q

Cheers, It will fix your problem :)

If mysql fails to start and givesĀ  mysql.sock error

Try this to fix the error.
===================
cd /var/lib/mysql
===================
touch mysql.sock
===================
chown mysql:mysql mysql.sock
===================
chmod 1777 mysql.sock
===================
now make a sym link into /tmp

ln -s /var/lib/mysql/mysql.sock /tmp
===================
then

chmod 1777 /tmp
===================
now

/scripts/mysqlup –force
===================

now just restart mysql

/etc/rc.d/init.d/mysql restart

===================

This will fix the sock error and mysql will be running fine now.