Benjamin Juang (ibneko) wrote,
Benjamin Juang

English. And then some MySQL.

A language that lurks in dark alleys, beats up other languages and rifles through their pockets for spare vocabulary."

Spotted in a userpic here: Can't find original source. Am amused.

Am also going to go shower. :: yawns:: sleeping at 4 AM 'cause you wanted to keep talking to someone on the other side of the world, and then getting up at 11 AM, to only poke the internet, and then go back to sleep until 1 PM is probably bad. Mmm, rambling sentences.

I should be productive today.

Yesterday, I set up mysql replication, one-way. 4.1 master on linux, and 5.0 slave on OSX. Took me way too long though - the instructions are lacking. But in rough order:
1) Modify my.cnf files.
2) Restart master server so you have the master table
3) Use mysqldump to dump said database. Or flush and lock the tables and make a copy of the database files themselves (binary copy? with tar?). OR go to the slave table and do a LOAD... something or other (Load from master?). The last one requires the slave to be set up though... so do 4 then then load? Might have to do 4 and 5, then the load?
4) On the slave side, if you didn't specify the master parameters in the my.cnf file, set them now. CHANGE MASTER TO... etc.
5) mysql> START SLAVE; (on the slave side, obviously)

Verification of success:
6) Check the error logs on the slave side for errors. Use SHOW SLAVE STATUS; on the slave side to check connection status. Check the relay.log (looks like relay.[some numbers here] files.) Log files stored in mysql data directory, unless specified by my.cnf. Suggested unreadable by other / everyone.
Tags: mysql, quotes

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment