ubuntu安装mysql时遇到的问题

2017-08-29  本文已影响170人  Davidham3
  1. sudo scripts/mysql_install_db --user=mysql
    出现FATAL ERROR: Neither host 'David' nor 'localhost' could be looked up with /usr/bin/resolveip
    Please configure the 'hostname' command to return a correct hostname.

把mysql目录下bin里面的resolveip复制到/usr/bin/下

  1. 再次启动后出现
    [ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'

将mysql目录下share/english/errmsg.sys复制到/usr/share/mysql

  1. sudo bin/mysqld_safe --user=mysql &启动mysql服务后,打开另一个终端,bin/mysql可以进入mysql控制台,但是使用sudo ./bin/mysql_secure_installation修改root密码时,出现ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (13),此时使用sudo ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock建立软连接后,即可使用
上一篇下一篇

猜你喜欢

热点阅读