pg_dump is an effective tool for PostgreSQL through which we can backup postgres database and to restore PostgreSQL database, command psql is enough. 1) backup postgres database Ssh to server and execute following command to take backup of database. #pg_dump -U Db_User Db_name -f database_name.sql Executing above command will prompt you for database password, once …
Category Archive: Mysql
Jul 14
backup database with cron
If you whis to backup Mysql database daily then you can use cpanel cron featur to setup a cron Use following cron. 0 0 * * 0 mysqldump –u database_user –pdatabases-password database_name > database_name-`date “+%Y-%m-%d”`.sql contact@webhostingsupport.info
Apr 13
Check database engine
If you wish to check, which database engin is used by your database i.e is it using MyISAM or InnoDb There are two ways to check database engine one is thruogh phpmyadmin and other is through shell. 1) Login to cpanel >> phpmyadminm >> select database . Under structure Tab you will see colum name …
Mar 30
Error on clicking phpMyAdmin
===== Warning: session_start() [_function.session-start_ (http://xxx.xxx.xxx:2082/3rdparty/phpMyAdmin/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() [function.session-start]: Failed to initialize storage module: sqlite (path: /var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/session.inc.php on line 86 ====== SOLUTION: 1) Login to shell of the server using root login details and …
Mar 30
Creating mysql log file on cpanel
MySQL log file is not turnd on by default. Here how you turn it on: 1) Login to your server as root 2) Open my.cnf with your favorite editor. Example nano /etc/my.cnf 3) Into the [mysqld] section add the fallowing lines log-slow-queries = /var/log/mysql-slow.log long_query_time = 3 Note: You can use any file name that …

Recent Comments