Skip to content

Tag «mysql»

Create a MySQL Slave using Replication with No Downtime

I have a customer who has over 100GB of MySQL data and taking their site down for even a few minutes is not feasible. I really wanted to get a slave set up in case the main server ever dies. Even though the server is backed up, it would take 2-3 hours (or longer) to …

Dumping and importing from/to MySQL in an UTF-8 safe way

In a nutshell: to avoid your shell character set from messing with imports, use -r to export and SOURCE when importing. Dumping safely Do not do this, since it might screw up encoding: mysqldump -uroot -p database > utf8.dump # this is bad Better do: mysqldump -uroot -p database -r utf8.dump Note that when your …