Prerequisites: Using the system’s environment
3.13.0-24-generic
Version of mysql: 5.6.33
Error description.
The first error reported with mysqld_safe start is as follows.
root@zabbix-forFunction:~# mysqld_safe
170425 01:56:52 mysqld_safe Can’t log to error log and syslog at the same time. Remove all –log-error configuration options for –syslog to take effect.
170425 01:56:52 mysqld_safe Logging to ‘/var/log/mysql/error.log’.
170425 01:56:52 mysqld_safe A mysqld process already exists
root@zabbix-forFunction:~# ps -aux | grep mysql
mysql 1472 0.1 15.5 1752260 625824 ?Ssl Apr24 1:16 /usr/sbin/mysqld
root 10160 0.0 0.0 15952 920 pts/3 S+ 01:59 0:00 grep –color=auto mysql
At this time, use /etc/init.d/mysql stop to stop the mysql service and find that the mysql process is still present, you need to use the following command to stop the process.
root@zabbix-forFunction:~# sudo service mysql stop
mysql stop/waiting
root@zabbix-forFunction:~# ps -aux | grep mysql
root 13531 0.0 0.0 15948 920 pts/3 S+ 02:15 0:00 grep –color=auto mysql
Use the usermod command to relocate the directory where mysql is located.
root@zabbix-forFunction:~# sudo usermod -d /var/lib/mysql/ mysql
Then restart the mysql service again at
root@zabbix-forFunction:~# sudo service mysql start
mysql start/running, process 13597
Similar Posts:
- How to Solve MYSQL Startup Error: “MySQL Daemon failed to start”
- MySQL Error: the solution of command not found
- [Solved] MYSQL ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘mysql’
- Solution to the error of MySQL: unrecognized service (CentOS)
- [Solved] MYSQL8 Error: ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)
- [Solved] MYSQL ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘mys…
- MySQLAccess denied for user ‘root’@’localhost’ [How to Solve]
- How to Solve MySQL Startup error: mysql-bin.index not found (Errcode: 13)
- Mysql5.7 service startup error on Windows
- Nginx Error when installing the startup service failed to start a high performance web server and a reverse proxy serve