Posts tagged with ‘mysql’

Turn on MySQL query cache to speed up query performance?

advertisement

Many times developers looking for ways to speed up query, in mysql we can enable query cache to speed up query performance. Whenever query cache is enable, it will cache the query in memory and boost query performance.

As we know, speed is always the most important element in developing a website especially for those high traffic database driven website. You can try to turn on query cache to speed up query.

To speed up query, enable the MySQL query cache, before that you need to set few variables in mysql configuration file (usually is my.cnf or my.ini)

Continue reading Turn on MySQL query cache to speed up query performance? »

How to backup MySQL Database in command line with compression

advertisement

For those who looking for way to backup mysql database,
you can use mysqldump to backup mysql database.

Below is the script example to backup mysql database in command line:-

$ mysqldump -h localhost -u username -p database_name > backup_db.sql

If your mysql database is very big, you might want to compress your sql file.
Just use the mysql backup command below and pipe the output to gzip,
then you will get the output as gzip file.

Continue reading How to backup MySQL Database in command line with compression »

How to restore MySQL database from sql dump file?

advertisement

mysql, mysql database, sql database, sql, database server, server, sql database server, mysql database server
There are 2 ways to restore your MySQL database from sql dump file.

1st way to restore mysql database from sql dump file is using mysql web control panel – phpMyAdmin
– Log into phpMyAdmin.
– Select your preference database on the left database navigation drop down list.

Continue reading How to restore MySQL database from sql dump file? »