Activities

April 2010
M T W T F S S
« Mar   May »
 1234
567891011
12131415161718
19202122232425
2627282930  

MySQL : Passwordless root login

How do I skip asking mysql root password every time I logged as system “root” account ?

1. Create a “.my.cnf” in root user home directory. 2. add the following entry on it and save and quit.

[client] user=”root” pass=”HdfH8%KS9s”

3. Change the file permission to 700.

[root@rc-040 ~vi ~/.my.cnf <code>[root@rc-040 ~]# chmod 700 .my.cnf [...]

Mysql replication : on Centos

Here I’m going to replicate a database on the master DB server to a slave server.

On Master DB server,

1. Identify the database to be synchronized. 2. Edit /etc/my.cnf in between [mysqld].

log-bin=/var/log/mysql/mysql-bin.log binlog-do-db=securedb server-id=1 Then restart the mysql daemon, #service mysqld restart make sure that the file is created automatically and owned by [...]