Binary log MySQL’s Official website defines the binary log as follows: The binary log contains “events” that describe database changes such as table creation operations or changes to table data. It also contains events for statements that potentially could have made changes (for example, a DELETE that matched no rows). The binary log also contains […]
Category: MySQL
Recover Corrupted Table [MySql]
Why does the database crash!? What can we do if it does? A database corruption can be due to many scenarios, like when a query does not find a table where its supposed to or when the query comes back with incorrect data. They can get corrupted due to a various of reasons, we can […]
Sql.safe mode
Ever came across an error like these: Notice: SQL safe mode in effect – ignoring host/user/password information in [path]/adodb-mysql.inc.php on line 343 mysql_connect(): SQL safe mode in effect – ignoring host/user/password information in [path]/adodb- mysql.inc.php on line 339 The solution is very simple. In php.ini file, set [SQL] sql.safe_mode = Off If sql.safe_mode is enabled, […]
Reset root password for MySQL
You can view the MySQL root password in the file /root/.my.cnf. # cat /root/.my.cnf [client] pass=”sdd568c~M” user=root Want to reset the root password for MySQL? Follow the below steps. 1. Stop mysql 2. Create a text file(for eg: /home/mysql-init) and place the following statements in it. Replace the password with the password that you want […]
Common errors
Error #1 “Starting MySQL. ERROR! Manager of pid-file quit without updating file.” Solution: If you’re getting the above error while starting mysql, check the mysql error log by using the following command: tail -f /var/lib/mysql/*.err Here you can see the reason. Issue maybe due to the presence of incorrect variables existing in ‘/etc/my.cnf’. Error #2 […]