MySQL usefull queries & points

Here I want to share some useful MySQL queries , tips & points 1. To get last executed queries in MySQL : Ans: You can get last executed queries in MySQL by command : First on “general_log” by- set global general_log=’ON'; Then: set global log_output=’TABLE'; after that you can get results by query : select […]

Mysql Day wise Backup

I am using Windows 7 System. My Mysql is installed into D: . It is done simple using a Batch file. Batch file will call automatically using scheduler etc. In my batch file d:\DB_Backup is the Backup Directory. We are creating current dated folder Into DB_Backup folder and create .sql file into current dated folder. […]

Mysql replication

Setting up MySQL replication without the downtime Mysql replication is a way where we can manage database simultaneous backup. First, you’ll need to configure the master’s /etc/mysql/my.cnf by adding these lines in the [mysqld] section: server-id=1 binlog-format = mixed log-bin=mysql-bin datadir=/var/lib/mysql innodb_flush_log_at_trx_commit=1 sync_binlog=1 Restart the master mysql server and create a replication user that your slave server […]