During the installation process of MySQL4.1, there is a default character setting, which is shown in the picture below
If your server has not selected the default setting of GB, UFT8 will be used and garbled characters will appear
Or
As long as you connect to the database, execute this
mysql_query("Set Names 'uft8'");
where uft8 can be changed to the encoding you need, e.g. gb2312, etc.
This command can also be used in the mysql command line, so that the correct text can be displayed
When connecting to the database, it appears
------------------------ -------------------------------------------------- ------------------
Client does not support authentication protocol requested
by server; consider upgrading MySQL client
---------- -------------------------------------------------- ----------------------------------
Since the password hash algorithm has changed since MySQL version 4.1, it is difficult to connect to the database
Client does not support authentication protocol problem may occur.
This can be solved by the following two methods
One:
mysql> SET PASSWORD FOR
-> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
Second :
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
-> WHERE Host = 'some_host' AND User = 'some_user';
mysql> FLUSH PRIVILEGES;