Ooo to mirror a database.

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Deddog
Forum Commoner
Posts: 55
Joined: Thu Sep 26, 2002 6:05 am
Location: Brighton

Ooo to mirror a database.

Post by Deddog »

Being thick - but what the hell- LONG week!

Trying to mirror the mysql DB on one Apache2 win2000 server to that on another.

Found an article about it and failed misserably 8O

The article told me to make amendment to the my.cnf file. Took me ages to even sort that out. My server was showing .cnf files as Speeddial short cuts. In my version of MYSQL i had 4 .cnf files located in the mysql folder.

I renamed one of these file to my.cnf, made the appropriate amends and moved the file to c:/. The 3 .cnf file where called my-huge, my-large, my-medium and my-small.

I placed the following line in to make the machine a master :'log-bin'
I placed the following lines(similar) in to make machine2 the slave :

master-host=10.1.1.1
master-user=replicate
master-password=password

Am i off the mark? Why was there not a MY.cnf in the installation? Why the 4 seperate ones?
smeyers
Forum Newbie
Posts: 5
Joined: Sat Dec 13, 2003 11:13 pm

Post by smeyers »

Heh, yes i found that odd also, not used to doing this stuff on windows.

This friday just passed I had to bring a Databaase with me, so i set up a developement server on my lap top, and i had the option to either make the MY.CNF in the c:\\ directory, or my.ini in the winnt (Windows on xp) directory, I put mine in the winnt directory, and i had the four, small, large, huge or what ever into the mysql directory, from what I saw they are supposed to be there, don't ask me why, i just made a whole new file.

Code: Select all

їmysqld]
base=E:/installation-path/
datadir=E:/dat-path/
When i did this after the instalation no good, then i uninstalled had this file saved as my.ini in my winnt directory, ran the instalation, server started up.
How to run mysql as a service at startup,, well that i haven't figured out yet, have to go in and click on mysqld manually :\
Hope this helps ya, cuz I have no idea how it helped me, but my server is good to go.
Post Reply