MySQL

[How To] Enable MySQL Event Scheduler status

mysql logo

The event scheduler in MySQL needs to be enabled for some applications to work flawlessly. In this case, a small change is required in the MySQL configuration file my.cnf. Steps: 1. Open my.cnf file in your favourite editor vi /etc/my.cnf 2. Add following line event_scheduler=on This will enable MySQL event scheduler on the server. 3. Restart MySQL service /etc/init.d/mysql restart …

Read More »

[How To] Reset MySQL root password

mysql logo

MySQL root password is important if you want to access phpMyAdmin, secure MySQL command prompt access, etc. In case one forgets the MySQL root password or wants to set root password, following steps should help to achieve the same. 1) Stop the MySQL Server: /etc/init.d/mysql stop or /etc/init.d/mysqld stop 2) Start the MySQL configuration: mysqld --skip-grant-tables & or mysqld_safe --skip-grant-tables …

Read More »

MySQL replication problem: ‘show master status’ shows ‘Empty set (0.00 sec)’

mysql logo

In MySQL replication, you setup master and slave MySQL server. On master server, while checking the master status, you might end up with following error message: 1 2 3 4 mysql> SHOW MASTER STATUS; Empty set (0.00 sec) mysql> show binary logs; ERROR 1381 (HY000): You are not using binary logging The MySQL error log will not provide any help …

Read More »

[How To] Update or Change MySQL database timezone

mysql logo

Sometimes you need to change the timezone used by MySQL database for some  specific applications or globally. The below steps will guide you to change the MySQL time zone: 1) Check time_zone* tables in mysql database. If it is empty then insert Zone Info data using following command  mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql Systems like Linux, FreeBSD, Solaris, …

Read More »