docker中启动mysql的配置在 /etc/my.conf
问题:Mysql Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT
解决:innodb_strict_mode=0
挂载文件: -v /data/mysql/my.cnf:/etc/my.cnf 宿主机:容器位置
修改密码:
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'Cpsec!11';
导出数据:
mysqldump -u username -p dbname > dbname.sql
【bug记录】
Cannot connect to database server
Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
解决方法:
/etc/my.cnf 加上一行
skip_ssl
但是有的服务器中开启ssl也可以访问,具体引发原因还不清楚