sudo vi /etc/mysql/my.cnf
skip-name-resolve
查找 bind-address 并且注释掉它,因为不注解它,只能用127.0.0.1 来访问
#bind-address = 127.0.0.1
添加默认字符集和默认存储引擎
# The default character set that will be used when a new schema or table is
# created and no character set is defined
default-character-set=utf8
# The default storage engine that will be used when create new tables when
default-storage-engine=INNODB
sudo /etc/init.d/mysql restart 重启mysql服务
联系客服