While executing the mysqldump command you may have experienced following errors.
mysqldump: Got error: 1044: Access denied for user ‘root’@’localhost’ to database ‘information_schema’ when using LOCK TABLES
To quickly fix this problem use the following switch when running mysqldump for MySQL database backups.
mysqldump -u root -p -all-databases -single-transaction > all.sql
MySQLTuner is a high-performance MySQL tuning script written in perl that will provide you with a snapshot of a MySQL server health. Based on the statistics gathered, specific recommendations will be provided that will increase a MySQL servers efficiency and performance. The script gives you automated MySQL tuning that is on the level of [...]
Edit the /etc/my.cnf file and look for this line:
skip-innodb
and comment it out:
#skip-innodb
Add the following entry in the /etc/my.cnf file
default-storage_engine = InnoDB
Save the file, and restart mysql
/etc/rc.d/init.d/mysqld restart
You can use the following command to check the “storage engine” used in the server.
mysqladmin variables | grep storage_engine
You will see the storage engine as “InnoDB”.
# mysqladmin variables [...]
This query cache in mysql will help to improve my mysql performance.
query_cache_size=SIZE
The amount of memory (SIZE) allocated for caching query results.
Options are:
0 : Don’t cache results in or retrieve results from the query cache.
1 : Cache all query results except for those that begin with SELECT S_NO_CACHE.
2 : Cache results only for [...]
To reset MySQL root Password
1. Kill/Stop the MySQL Service
# pkill mysql / /etc/init.d/mysqld stop
2. Start mysql in safe mode
# safe_mysqld –skip-grant-tables & [OR]
# mysqld_safe –skip-grant-tables &
3. Connect to mysql
# mysql mysql
4. Update the root user Password
mysql> UPDATE user SET Password=PASSWORD(’New_Password’) WHERE Host=’localhost’ AND User=’root’;
5. Exit and kill mysqld_safe / safe_mysqld
# pkill mysqld_safe / [...]
This is usually a bug in the PhpMyAdmin configuration, whenever you receive the following error when accessing PhpMyAdmin either from WHM or cPanel,
Error :
Warning: session_start() [function.session-start]: SQLite: failed to open/create session database `/var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb’ - unable to open database: /var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/session.inc.php on line 86
Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: sqlite [...]
Repairing MyISAM mySQL Tables/Databases:
cd /var/lib/mysql/DBNAME
#^ Please note that we assume your mySQL data directory is /var/lib/mysql
myisamchk *.MYI
Repairing ISAM mySQL Tables/Databases:
cd /var/lib/mysql/DBNAME
isamchk *.MYI