在MySQL4.1的安装过程中有缺省character的设置在下图中有显示
如果您所在的服务器有没有选择缺省为GB则会使用UFT8就会出现乱码
或者
只要在你连到数据库后,先执行这句
mysql_query("Set Names 'uft8'");
其中 uft8 可改成你需要的编码,e.g. gb2312 等
这个命令也可以用于 mysql 得命令行,从而可以显示正确的文字
连接数据库出现
-------------------------------------------------------------------------------------------
Client does not support authentication protocol requested
by server; consider upgrading MySQL client
-------------------------------------------------------------------------------------------
由于MySQL 4.1版本开始密码的hash算法改变,所以连接数据库
时可能会出现Client does not support authentication protocol问题。
可以通过一下两种方法解决
其一:
mysql> SET PASSWORD FOR
-> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
其二:
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
-> WHERE Host = 'some_host' AND User = 'some_user';
mysql> FLUSH PRIVILEGES;

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver CS6
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Mac version
God-level code editing software (SublimeText3)