使用mysqld_safe启动mysql服务器5.7.17时,发生以下错误。
2017-02-10T17:05:44.870970Z mysqld_safe Logging to '/var/log/mysql/error.log'. 2017-02-10T17:05:44.872874Z mysqld_safe Logging to '/var/log/mysql/error.log'. 2017-02-10T17:05:44.874547Z mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exists.
如何解决?
在安装时未创建此目录似乎很奇怪-您是否在my.cfg中手动更改了套接字文件的路径?
您是否尝试过自己简单地创建此目录并重新启动服务?
mkdir -p /var/run/mysqld chown mysql:mysql /var/run/mysqld