Help me to synchronize MySQL Linux and Windows XP

Asked By 40 points N/A Posted on -
qa-featured

Hello friends, Please help me to synchronize MySQL Linux and Windows XP.

I would like to use the same database in both Operating System.

SHARE
Best Answer by Baker Mich
Answered By 0 points N/A #185007

Help me to synchronize MySQL Linux and Windows XP

qa-featured

Hello Timothy

I will assume that you are using Debian-like distribution since those distributions are most used on desktops computers.

Open Terminal and type: sudo apt-get install mysql-workbench

After the installation is done open MySQL WorkBench and connect to your database.

Now you can manipulate with your database both from XP and Linux.

Cheers.

Best Answer
Best Answer
Answered By 0 points N/A #185008

Help me to synchronize MySQL Linux and Windows XP

qa-featured

Hi Timothy,

You can follow the below steps to replicate the MYSQL LINUX on window xp as well.

1. Configuring Master Server

First edit /etc/mysql/my.cnf. Then enable networking for MySQL, and it should respond to all IP addresses, hence we need to comment out these lines.

#skip-networking

#bind-address            = 127.0.0.1

Put the following lines into/etc/mysql/my.cnf:

server-id               = 1

log_bin                 = /var/log/mysql/mysql-bin.log

binlog_do_db            = exampledb

 Then we restart MySQL:

/etc/init.d/mysql restart

Next, log into the MySQL database as root and create a user with replication rights:

mysql -u root -p

Enter password:

Currently we are on the MySQL shell.

mysql>GRANT REPLICATION SLAVE ON *.* TO ’slave_user’@’%’ IDENTIFIED BY ‘<some_password>’; (Replace<some_password> with a real password!) 

mysql>FLUSH PRIVILEGES;

Then (Being On the MySQL shell) do this:

 mysql>USE exampledb;

mysql>FLUSH TABLES WITH READ LOCK;

mysql>SHOW MASTER STATUS;

The last command should be  like this:

| File          | Position | Binlog_do_db | Binlog_ignore_db |

| mysql-bin.006 | 183      | exampledb    |                  |

1 row in set (0.00 sec)

Save this information, as we will need it later on the other OS!

Now leave the MySQL shell:

mysql>quit;

2. Configuring Slave Server(Windows XP)

Edit c:program filesmysqlmysql server 5.0my.ini 

server-id=2

master-host=db01.yourdomain.net (or IP address)
master-port=3306
master-user=slave_user
master-password=password

3. Restarting Mysql Service 

goto> Control Panel>Administrative Tools>Services>Mysql 

Restart the Service

mysql > Stop slave;

mysql>CHANGE MASTER TO MASTER_HOST=’192.168.10.175′, MASTER_USER=’slave_user’, MASTER_PASSWORD=’password’,MASTER_LOG_FILE=’mysql-bin.000008′,MASTER_LOG_POS=98;

mysql > Start slave;

hope this helps.

Thanks Baker

Login/Register to Answer

Related Questions