You might encounter this error if you are using MySQL 4.1 or greater. The cause of this problem is that the newest version of MySQL has a longer password than the older implementations. One way to fix this problem is reseting the password to the old format inorder so that your client to still use the server.
the first thing that you need to do is run mysql and login as root:
mysql -u root -p
then run the following script to reset the password of a specific user to the old format:
you need to flush the tables after running this script:
now, issue a ‘quit’ command to exit the mysqlclient