美文网首页
mariadb 导入数据遇见得问题

mariadb 导入数据遇见得问题

作者: 我的自动化测试历程 | 来源:发表于2019-10-08 11:36 被阅读0次

数据库启动

service mysqld start 

mysql:1153 Got a packet bigger than ‘max_allowed_packet’ bytes的解决方法

1.临时修改:

mysql>setglobal max_allowed_packet=524288000; #修改 512M

2.修改my.cnf(windows下my.ini),需重启mysql。

在 [MySQLd] 部分添加一句(如果存在,调整其值就可以):

max_allowed_packet=256M (根据实际情况调整数值)

可通过命令:

showVARIABLESlike'%max_allowed_packet%’;

MySQL 建索引时 Specified key was too long; max key length is 767 bytes 错误的处理

SHOW variables like 'innodb_large_prefix'

临时修改

SET GLOBAL INNODB_LARGE_PREFIX = ON;

SHOW variables like 'innodb_file_format'

临时修改

SET GLOBAL innodb_file_format = BARRACUDA;

永久修改

vim /etc/my.con.d/server.conf

innodb_large_prefix=on

innodb_file_format=BARRACUDA

相关文章

网友评论

      本文标题:mariadb 导入数据遇见得问题

      本文链接:https://www.haomeiwen.com/subject/hicbpctx.html