MySQL4.1 Garbled Code Problem_PHP Tutorial

WBOY
Release: 2016-07-13 17:01:49
Original
931 people have browsed it

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;

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631125.htmlTechArticleDuring the installation process of MySQL4.1, there is a default character setting, which is shown in the figure below. If your server is If you choose to default to GB, UFT8 will be used and garbled characters will appear or as long as you...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template