Get the App
SLTechnology News&Howtos  ›  Database  › 

Simple Operation of MySQL data backup and recovery

Shulou Source: shulou.com Published: 2022-06-01 19:43:15 10月02日 Update

The following is followed by the author to understand the simple operation of MySQL data backup and recovery. I believe everyone will benefit a lot after reading it. The text is not much in essence. I hope the simple operation of MySQL data backup and recovery is what you want.

# data backup

Enter the Super Admin

Sudo-s

Enter the mysql library directory

Cd / var/lib/mysql

Run the mysqldump command

Mysqldump-uroot-p database name > ~ / Desktop/ backup file. Sql

Enter the password for mysql when prompted

# data recovery

Connect to mysql and create a database

To exit the connection, execute the following command

Mysql-uroot-p database name < ~ / Desktop/ backup file. Sql

Enter the mysql password when prompted

After reading this article on the simple operation of MySQL data backup and recovery, many readers will want to know more about it. For more industry information, you can follow our industry information section.

Tags: Data backup data backup database content commands passwords files more industry prompts affirmations inputs benefits information data recovery text friends columns directories Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Redmi Shulou Tech Info Xiaomi vpn