Mysql导入sql文件报错

我在迁移数据库的时候用sqlyog导入数据报错,内容如下:

There was error(s) while executing the queries .

The query and the error message has been logged at:

C:\Users\Administrator\AppData\Roaming\SQLyog\sqlyog.err.

Please click on "Open Error File..." to open the error file.

在网上找到如下解决方案:

在mysql的安装根目录下找到my.ini文件,编辑修改参数设置

1.在[mysqld]下添加:max_allowed_packet=768M (参数大小可以自己定



2.进入mysql下运行查看,可以用dos命令mysql -uroot -p 回车

输入mysql密码,回车

执行 show variables like '%max_allowed_packet%'; 回车


显示图中数据表明修改成功;


然后重新操作导入->执行sql脚本


执行成功!



猜你喜欢

转载自blog.csdn.net/qq_34864038/article/details/80105181