When building zrlog under Tomcat architecture, MySQL will report an error. As follows:
When entering the MySQL command
Error report
# mysql: command not found
This command does not exist
When restarting MySQL service
# /etc/init.d/mysqld restart
Error report
# mysqld_safe A mysqld process already exists
Try
First # PS aux | grep grep
, and then # kill - 9 PID
, kill MySQL related processes, no, report an error
First # kill MySQL
, and then restart, or not, report an error
Modify the/etc/my.cnf file, clear the relevant rules, restart mysql, or not
Solution:
MySQL is clearly installed and running normally. How can this problem occur
Method 1 (palliative treatment)
Run the command as an absolute path. For example, my native path is /usr/local/MySQL/bin/MySQL
# /usr/local/mysql/bin/mysql restart
Method 2 (cure the root cause)
# ln -s /usr/local/mysql/bin/mysql /usr/bin
It is equivalent to creating a linked file- S for soft link
# mysql -uroot -p
Similar Posts:
- MySQL Error: The server quit without updating PID file [How to Solve]
- How to Solve MYSQL Startup Error: “MySQL Daemon failed to start”
- How to Solve MYSQL error “no directory, logging in with home = -“
- How to Solve MySQL Startup error: mysql-bin.index not found (Errcode: 13)
- MySQL [ERROR] Table ‘mysql.user’ doesn’t exist
- Can’t open and lock privilege tables: Table ‘mysql.user’ doesn’t exist
- When installing MySQL database on MAC, the system prompts MySQL: command not found
- When installing MySQL database on Mac OS, the system prompts MySQL: command not found
- [Solved] MYSQL8 Error: ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)
- How to Solve MYSQL Error: Can’t create test file xxx lower-test