CentOS6 system MySQL Master-slave database replication configuration details (1/3)

Source: Internet
Author: User

View MySQL Port is open

netstat-tanl | grep 3306

MySQL User's authorization

Mysql-uroot-p

View the existing User authorization table

Select User,host,password from Mysql.user;

Test connection to other MySQL server

Mysql-uroot-p-h192.168.0.100

Authorized user user1, password 456 all permissions from 192.168.1.181 host access to all databases of this server.

Grant all on *.* to slave@192.168.1.181 identified by "123456";

Log on to a remote MySQL server

mysql-uslave-p123456-h192.168.1.180

View the current database

Select Database ();

View table Structure


DESC table1;

Open MySQL Bin-log

Vim/etc/my.cnf
[Mysqld]
Log-bin
Or

Log-bin=mysql-bin

Bin-log Save path-database Data folder root directory

/var/lib/mysql

Home 1 2 3 last

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.