您好,欢迎光临! 推荐您使用Chrome浏览器访问本站。

MySQL升级5.6恢复dmp时报:MySQL server has gone away/The size of BLOB/TEXT data inserted…

1,092 views
MySQL升级5.6恢复dmp时报:MySQL server has gone away/The size of BLOB/TEXT data inserted…在升级mysql到5.6恢复dmp数据文件时遇到两个问题 1、ERROR 2006  MySQL server has gone away 2、ERROR:The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size. Increase the redo log size using innodb_log_file_size. 第一个问题: 是由于dmp文件过大,导致MySQL server断开了连接。 解决办法是修改mysql配置文件my.ini(windows),my.cnf(linux) [mysqld] max_allowed_packet=500M [mysqldump] max_allowed_packet=500M 其他参数也可能影响连接,值得注意: SET GLOBAL event_scheduler ......

mysql转移数据报ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

829 views
mysql转移数据报ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)关闭mysql服务: service mysqld stop 转移mysql数据目录 mv /var/lib/mysql/ /data/ 编辑my.cnf vi /etc/my.cnf 修改其中的datadir和socket到新的路径 [mysqld] datadir=/data/mysql socket=/data/mysql/mysql.sock service mysqld start 但是尽管启动服务没有问题,但是通过mysql客户端连接的时候却报错: [root@hostXXX data]# mysql -u root -p Enter password: ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) 原因是无法通过socket文件/var/lib/......

got a packet bigger than ‘max_allowed_packed’ bytes

1,001 views
got a packet bigger than ‘max_allowed_packed’ bytesgot a packet bigger than ‘max_allowed_packed’ bytes. 数据导入报错:Got a packet bigger than‘max_allowed_packet’bytes. 2个解决方法: 1.临时修改:mysql>set global max_allowed_packet=10240;  (10M) 2.修改my.cnf(bin/my.ini),需重启mysql。 在 [mysqld] 部分添加一句(如果存在,调整其值就可以): max_allowed_packet=10M

The user specified as a definer (‘root’@’%’) does not exist

1,300 views
The user specified as a definer (‘root’@’%’) does not exist从其他库导入后,查询无法使用,提示:The user specified as a definer (‘root’@’%’) does not exist,原因为root无访问权限,只要给root用户再添加一个对全部host都有可以访问的权限 操作如下: 登陆mysql mysql -u root -pPasswd mysql >grant all privileges on *.* to root@”%” identified by “Passwd” mysql >flush privileges;

You can’t specify target table

1,006 views
You can’t specify target table今天在批量删除记录时出现You can’t specify target table ‘threaddet’ for update in FROM clause错误提示。 语句如下: delete from threaddet where id in (SELECT m.id FROM `threaddet` m left outer join `filedmsg` f on (m.filemsgid = f.id) WHERE f.id is null) 后查找网络得到错误原因为: 不能先select出同一表中的某些值,再delete这个表(在同一语句中)。 使用oracle时常常这样写,但mysql是不支持此种用法。后改用网友的子集方式,搞定此问题。 改进后的语句: delete from threaddet where id in ......