MySQL uses phpMyAdmin to implement database synchronization update

Source: Internet
Author: User
Tags centos phpmyadmin port number

Console as a server to implement. Here I'm taking the process I do share a
, there are wrong places, to each netizen pointed out.
System: CentOS Linux Server a ip:192.168.0.8 windows2003 suit
A ip:192.168.0.9 of the service machine
Software: CentOS Linux Server installs a mysql-server5.0 windows2003
Install a call Apmserv software with a mysql5.1,phpmyadmin (graphics
Manage MySQL database)
First, in the main service to create a user, used to synchronize the data used, I am here to pick
Use a graph to manage MySQL database software to build (phpMyAdmin)
Note here: This user admin rights must have replicaiion

slave is both a replication privilege:

Two, I use in the windows2003 from the server to use the newly built user admin whether can
Connect to Linux (main service) Apmserv Usage I don't give a detailed description here.
Running from server: Mysql-h 192.168.0.8-u admin-p and then input password
( note : Because in MySQL this is destined to be in the WinDOS system is not, so add an environment variable)
Third, configure the master server profile: vim/etc/my.cnf
Server-id=1
Log-bin
These two lines are new.
Restart MySQL
Mysql-u root-p
Show master status;
(This indicates a successful primary server configuration)
Four, from the server configuration file is also my.cnf
server-id=2 from the server ID number
Master-host Home Server Address
Master-port Port number
Master-user the user name required for replication
Master-password the password for the user name you want to copy
REPLICATE-DO-DB the database you want to replicate
and restart the database.
Mysql>show slave statusg;
The
master-slave server creates a new test1 database, where data from the primary server can be plugged in from the server. * The primary server IP address changes from the server. It is no use to change the/ETC/MY.CNF only to implement synchronization. The following command is required:

 

stop SLAVE;
reset slave;
Change Master to
master_host= ' master_ip ',
-> master_user= ' replication_user_name ',
-> master_ Password= ' Replication_password ',
-> master_log_file= ' recorded_log_file_name ',
-> MASTER_LOG_POS= Recorded_log_position;

 

Start slave;

The

Replaces the Master_ip,master_user,master_password as the master IP address, the user with replication permissions, and the password
Recor Ded_log_file_name replaced by the File,recorded_log_position recorded above for the position

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.