安装mysql后,命令操作sudo /etc/init.d/mysqld start时出现ubuntu下mysql无法启动Couldn't find MySQL server (/usr/bin/mysqld_safe)”的错误。
输入如下指令
root@mysql:~# mysqld --verbose --help|grep my.cnf 2016-05-31 16:36:09 0 [Note] mysqld (mysqld 5.6.30-log) starting as process 3379 ...2016-05-31 16:36:09 3379 [Note] Plugin 'FEDERATED' is disabled ./etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default
可以看到mysqld会去读取以上路径,经查找,发现在/etc/mysql/目录下,有这个文件
rm /etc/mysql/my.cnf删除此目录下此文件重启即好。