MySQL Data backup index principle and query optimization

Source: Internet
Author: User
Tags file copy mysql client

Add

MySQL visualization (IDE) tools

Our previous operations on the database are through the cmd command is more cumbersome then there is no more gradual way to do this thing? The answer must be looked down ...

Navicat The tool is a MySQL client visual software tool you only need to run the software after the point on the top of the easy to complete the construction of the database and other related operations

Download link Https://pan.baidu.com/s/1bpo5mqj

Follow the steps below when the installation is complete

1 Enter the page click on the link (equivalent to log in) and click OK

2 Click OK and then go to the page double-click the link name (for example, local Area Connection 1) to display the database that has been created

Click on a library icon will change color discoloration proof of success is equivalent to using the database switch to the library under the library can see all the content

3

4

5

6

7

8

9

Data backup

Back up your previously created library tables and specific records to prevent future data from being deleted by mistake.

Types of backups:

Before, the database is equivalent to a folder table is a file

1 Physical Backup: Locate the directory where the databases and tables are stored, and copy the copies that need to be backed up.

Advantages: Easy and quick to complete operation with just a few mouse points

Disadvantage: Direct copy file efficiency is the most important is the need to set the appropriate permissions in the Windows file copy to Linux can not be used for cross-platform performance poor

2 Logical Backup: Use the MySQL dump command to convert the associated libraries and tables into SQL statements into a file and restore the SQL statements in the file once again.

3 Exporting tables: Importing tables into a file

Backup syntax:

Mysqldump-h Server-u user name-p password database name > backup file. sql

Specific example (Backup library)

Mysqldump-uroot-p--database day45 > (path) c:\\day45_bak2017_10_30.sql

Indexing principle

Query optimization

MySQL Data backup index principle and query optimization

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.