More Technical Help

Showing posts with label cPanle-Mysql. Show all posts
Showing posts with label cPanle-Mysql. Show all posts

Sunday, March 20, 2011

Mysql Logs


MySQL General Information and Errors :
Location : /var/lib/mysql/$(hostname).err
Description : This path could vary, but is generally located in /var/lib/mysql. Could also be located at /var/log/mysqld.log

Mysql Slow Queries:
Location : /var/log/mysql-slow.log
 Description : These logs are only available if slow logs queries are enabled in my.cnf as well this   path cold vary but generally located in /var/log/

Saturday, February 12, 2011

How to backup Mysql Databases in Cpanel?

Mysql databases can be backed up by following steps 
  • 1. Login to cPanel interface >>> Files >>> Backups >>> 
  • 2. Underneath where it says "Download a SQL DB Backup", click on the database name that you wish to backup
  • 3. Select a place and filename for you to save on to your local computer
  • 4. Do NOT attempt to open this file with Winzip.
You have now successfully backed up your Mysql database with Cpanel.
There are other ways to accomplish this task, such as doing a dump from
PhpMyadmin, or doing a dump from the command line, but the cpanel
method is quick and easy.

Monday, January 17, 2011

Enable Logging of Slow MySQL Queries

MySQL has a feature that allows you to log slow running queries to a file. To enable you just need to add some lines to your my.cnf file, and restart.
Insert the following into /etc/my.cnf:
Save my.cnf and do the following when you return to a shell:
log-slow-queries = /var/log/mysql/mysql-slow.log
long_query_time = 5


#touch /var/log/mysql/mysql-slow.log
#chown mysql:mysql /var/log/mysql/mysql-slow.log
#service mysql restart