Archive for category Mysql

Tuning / Optimizing my.cnf file for MySQL

Tuning / Optimizing my.cnf file for MySQL: =========================== While optimizing our mysql server, we should know about the parameters and the values assigned to it. I am explaining the parameters and the appropriate value that should assign to it. 1. query_cache_size: In a situation where the database has to repeatedly run the same queries on […]

1 Comment

Mysql tuning using mysqltuner.pl perl script

MySQLTuner is a perl script that analyses mysql performance. The script will examine mysql parameters set in the server and it will suggest best possible values for these parameters. How to run ======= wget http://mysqltuner.pl/mysqltuner.pl perl mysqltuner.pl Sample Output ========= MySQLTuner output will look like this. ————————————————————————- >> MySQLTuner 1.2.0 – Major Hayden >> Bug […]

Leave a comment

How to take a backup/restore a mysql database from command line?

Mysql Database Restore ====================== Compression [ Backup ] ====================== mysqldump DatabaseName > DatabaseName.sql ll DatabaseName.sql Restore ====================================================== Create Database Name in Mysql mysql> create databasename; user databases; [Put the database backup under root directory] mysql DatabaseName < DatabaseName.sql mysql -u root -pWEKBxrBV travelblog_trv2blg < travelblog_trv2blg.sql ———— Restore from the root ======================================================== 1) mysqladmin drop database-name; […]

Leave a comment

MySQL server has gone away

*Warning*: MySQL server has gone away If you get the error message ” *Warning*: MySQL server has gone away”, that means your Php or Perl/cgi powered application has not passed a query for a while. The connection to MySQL times out. To start up a new and simple query session, select a table within the […]

Leave a comment

Mysql databses Backup & restore

Database backup command. You can use mysqldump command to take backup of your databases. #mysqldump -h mysqlpc -u raj -p **** testdata > testdata.sql [-h] = host machine ..specify if u want. [-u] = this is your database username [-p] = this is the password for your database [testdata] = the name of your database […]

1 Comment

phpMyAdmin

phpMyAdmin installation in Linux server: =============================== phpMyAdmin is a web-based tool used to manage databases. 1. Pre requisites: * Ensure PHP installed in the server is PHP 5 or above. PHP version can be checked using the command given below. ==== php -v ==== * Ensure Mysql version installed in the server is Mysql 5 […]

Leave a comment

Managing a MySQL Database in phpMyAdmin

To manage a MySQL database using phpMyAdmin, first you need to login to your cPanel account and then follow this guide. 1. Click on the ‘phpMyAdmin’ icon, which can be found in the Database section of your cPanel home screen. Note: This will open a new window showing the phpMyAdmin home screen. 2. On the […]

Leave a comment