Focus on cloud service provider activities
Notes on website operation and maintenance

Solve the problem that the backup database prompts "mysqldump: command not found"

Generally, when backing up a database, it is not a big problem to directly use phpmyadmin to export and import a smaller database for backup and restore. If the database is large or the integrity may be taken into consideration, it is recommended to use mysqldump And mysql commands to back up and restore the database (refer to: Explain how to use the mysqldump command to backup and restore MySQL data )。 Today, an error message "mysqldump: command not found" appears when backing up a server database of the company.

Lao Zuo has never encountered this error before. It is estimated that the system does not find the command file under/usr/bin by default. Here we need to readjust the soft link settings.

First, problems

 Solve the problem that the backup database prompts "mysqldump: command not found"

Second, solve problems

find / -name mysql -print

Find the directory where the mysql software is located.

Here we can see the path of MySQL.

/usr/local/mysql/bin/mysql

Third, set soft links

ln -fs /usr/local/mysql/bin/mysqldump /usr/bin

ln -fs /usr/local/mysql/bin/mysql /usr/bin

After execution, let's try MySQL or mysqldump to restore and back up the database. My test can solve this problem. Finally, if we are not sure about the operation, it is recommended to back up the data before the operation.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » Solve the problem that the backup database prompts "mysqldump: command not found"


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge