Steps for restoring a MySQL database

Source: Internet
Author: User

This article mainly describes the actual restoration solution of the MySQL database and related syntaxes to be used. We all know that the files backed up by mysqldump are SQL scripts that can be directly imported, there are two main ways to import data.

Directly use the mysql client

For example:

 
 
  1. /Usr/local/mysql/bin/mysql-uyejr-pyejr db_name <db_name. SQL

Use SOURCE syntax

In fact, this is not a standard SQL syntax, but a function provided by the mysql client, for example:

 
 
  1. SOURCE/tmp/db_name. SQL;

Here, you need to specify the absolute path of the file, and the file must be read by the mysqld running user (such as nobody). The above content is an introduction to restoring the MySQL database, I hope you will have some gains.
 

The above content refers to the restoration of the MySQL database, hoping to help you in this regard.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.