日期:2014-05-16  浏览次数:20767 次

[汇总]mysql报错

?

?

=====================MySQL server has gone away

http://www.phpchina.com/?action-viewnews-itemid-33698

?

?

?

?

?

?


===================== Table 'mysql.servers' doesn't exist


mysql,user表中缺少servers表

?

初始化表的时候出的问题,建议采用官方提供的方法初始化数据

?

/usr/local/mysql/scripts/mysql_install_db \
--basedir=/usr/local/mysql \
--datadir=/data/mysql/mysql_3301

/usr/local/mysql/scripts/mysql_install_db \
--basedir=/usr/local/mysql \
--datadir=/data/mysql/mysql_3302

?

?

=====================? PDO::__construct(): Premature end of data (mysqlnd_wireprotocol.c:553)
Error Code : 1045

mysqlnd 不支持短密码格式

修改:
UPDATE USER SET PASSWORD = PASSWORD('123456') WHERE USER = 'replication';

?

?

?


?
?
===================== 客户端提示 Cannot proceed,system tables Event Scheduler


linux、windows下解决方法类似
$PATH/mysql/bin/mysql_upgrade - u root -p
例如:/usr/local/mysql/bin/mysql_upgrade - u root -p???? [回车输入密码即可]

$PATH mysql安装路径

执行完后停止mysqld后再重新启动mysqld一次,问题即可解决。

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?