Mysql常見報錯處理
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