Mysql常见报错处理

来源:互联网 发布:mysql登录后修改密码 编辑:程序博客网 时间:2024/06/09 15:37
1.报错信息
Fatal error: Uncaught exception ‘PDOException’ with message ‘SQLSTATE[HY000] [2000] mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD(‘your_existing_password’). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file’ in /home/hailong.xhl/test.php:8


解决:修改密码为41位的,参考链接:http://www.111cn.net/database/mysql/70488.htm


2.php提示Expected mysqli, got string
解决:参数顺序错误


3.MySQL语句对大小不敏感


4.mysql显示中文乱码
本地数据和远程数据库的my.ini文件中改为default-character-set=gbk


原创粉丝点击