Mysql Common Command Set

Source: Internet
Author: User

The 1.mysqlbinlog tools use the following methods:

Use Show First binary Logs View

When you use the Export command

Mysqlbinlog-r-uroot-pxxxx-hxxx.xxx.xxx.xxx-d db_name--base64-output=decode-rows--start-datetime= ' 2015-08-13 13:1 1:21 '--stop-datetime= "2015-08-13 13:18:21" mysql-bin.000008 > Mysql-bin.ran_trade_08_13.sql

Here's how to use 2.mysqldump:

Mysqldump-u user name-p database name > exported file name


3. Change the root account password

Mysqladmin-u root password "New password"


4. Assigning permissions to specific users

GRANT all privileges on * * to ' root ' @ '% ' identified by ' password ' with GRANT OPTION; FLUSH privileges;

5.Mysql Server Open Remote connection

1) Open the remote access permission for the corresponding account

$ mysql-uroot-pmysql > Use mysql;mysql > Update user set host = '% ' where user = ' root '; MySQL > Flush privilege S

If the error "Error 1062 (23000): Duplicate entry '%-root ' for key ' PRIMARY '" When the update is executed, the workaround is as follows

mysql> Delete from user where user = ' root ' and host = ' * ';


2) Open service allows remote connections to edit files/etc/mysql/my.conf

$ vim/etc/mysql/my.conf #找到bind-address Comment out this line $/etc/init.d/mysql restart #重启mysql服务



Original address: Mysql common Command set

Mysql Common Command Set

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.