How to access your database remotely on a cPanel hosting First of all, it is important to explain how the database & database user names are formed. The names consist two parts — your cPanel username and the actual database username name. For example — if your username is “user” and if you named your […]
Archive for the ‘Mysql’ Category
Enable Logging of Slow Queries in MySQL Database
Any non-optimal SQL commands or statements that take too long or lengthy time to execute will use up a lot of system resources, causing MySQL database to run slower. MySQL has built-in functionality to capture slow query log or identify queries that take a long time to execute. You can enable the full SQL queries […]
Starting MySQL couldn’t find MySQL Manager
While doing a mysql start you may sometimes get the following error: Starting MySQLCouldn’t find MySQL manager (/var/lib/bin/mysql) or server (/var/lib/bin/mysqld_safe) To fix this you need to comment out or remove the basedir directive line from /etc/my.cnf file [mysql.server ] server=mysql #basedir=/var/lib Now restart mysql # service mysql restart
Mysql gives error of access denied for root@localhost on cPanel Servers
The most possible cause of this error is an incorrect password. You can usually find the correct password in this file: /root/.my.cnf. The file will contain the first root password the server was given once cPanel is installed. If it still does not work, you will need to reset the mysqld root password. To do so […]
Method to take mysql dump of table structures
In order to take the dump of a database table structure you can use the option “-d” of mysqldump. The syntax is given below. $ mysqldump -u USERNAME -p -d DATABASENAME –tables TABLENAME1 TABLENAME2 > FILENAME.sql Replace the USERNAME, DATABASENAME, TABLENAME, FILENAME with the original one. You can verify the file for the table structures. […]
MySQL Root Password Reset
When you try to install mysql using rpm then some times you have faced password authentication problem. This is not an issue, it means your mysql server is working fine but need authentication to access it. So let us do the following:- $ pkill -9 mysql This is for killing the mysql process running in […]
InnoDB has been disabled for this engine
If you are getting this error so first check if InnoDB is enabled or not using following steps, root@server[~]# mysql SHOW ENGINES; Above command will give you following output mysql> SHOW ENGINES; +————+———+—————————————————————-+ | Engine | Support | Comment | +————+———+—————————————————————-+ | MyISAM | YES | Default engine as of MySQL 3.23 with great performance […]