MySQL user management, common SQL statements, and database backup

Source: Internet
Author: User
Tags percona
One, MySQL user management

1. Create user (user root, highest privilege)
Grant all on . to ' user1 ' @ ' localhost ' identified by ' passwd ';
(The MySQL file specifies the socket)

Grant all on the user1 ' @ ' 127.0.0.1 ' identified by ' passwd ';
(Specify-H when MySQL configuration file specifies IP)

Description: Grant all//Authorize all permissions,
@ ' localhost '//Specify the source IP, if you change it to%, it means all IP, wildcard
. The first one refers to the library name, . * Is all
2. Authorized users

II. Common SQL statements Third, MySQL database backup recovery iv. INNOBACKEX tools backup MySQL Data

Xtrbackup can only be used to back up the database of the InnoDB engine, and Innobackex either backs up the database for the InnoDB engine or backs up the MyISAM engine's database. Backup can also be divided into full-scale backup and incremental backup
1. Install Yum extension source Percona-release

RPM-IVH http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm

2, Installation Percona-xtrabackup

Yum Install Percona-xtrabackup

MySQL user management, common SQL statements, and database backup

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.