problems when installed mysql in linux ubuntu

reference:http://www.jb51.net/article/87160.htm?pc

1.ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/usr/local/mysql/mysql.sock' (2)

more /etc/my.cnf |grep sock #显示sock的目录

在mysql目录下并没有找到mysql.sock,默认在/tmp目录下,所以修改/etc/my.cnf

socket = /tmp/mysql.sock  #修改/添加该行

 

2.mysql: [ERROR] unknown variable 'character-set-server=utf8'

“character-set-server=utf8” 语句改为:

default-character-set=utf8

loose-default-character-set=utf8

posted @ 2017-03-04 12:37  qczhang  阅读(137)  评论(0编辑  收藏  举报