Export/Import Mysql Database

Export a database mysql # mysqldump -u -p username database_name > dbname.sql Plesk Server # mysqldump -u admin -p`cat /etc/psa/.psa.shadow` wordpress_database > domain_backup_7.16.14.sql To export a single table from your database you would use the following command: # mysqldump -p –user=username database_name tableName > tableName.sql Import a database or tableRead More…

Remove SSL default Cert on Plesk 11.0.9

Log into mysql. mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql> select dom_id,certificate_id from hosting where dom_id=13; +——–+—————-+ | dom_id | certificate_id | +——–+—————-+ | 13 | 0 | +——–+—————-+ 1 row in set (0.00 sec) mysql> SELECT * FROM IP_Addresses; +—-+—————+————-+—————+——-+——————–+——————-+——-+——+——–+ | id | serviceNodeId | ip_address | mask | iface |Read More…

MySQL’s wait_timeout and interactive_timeout Variables

Ever get these errors? Mysql reporting error when accessing plesk. Zend_Db_Adapter_Exception: SQLSTATE[08004] [1040] Too many connections. You can set-variable=max_connections=250 to /etc/my.cnf and restart and use mysql close statements for php code. Or, set up mysql to close sleeping processes. Mysql Config. (/etc/my.cnf) wait_timeout variable represents the amount of time thatRead More…

Optimize Mysql

Did you know that mysql comes with configuration files for better optimization? These files are located at: /usr/share/doc/mysql-server-5.1.71/my-huge.cnf /usr/share/doc/mysql-server-5.1.71/my-innodb-heavy-4G.cnf /usr/share/doc/mysql-server-5.1.71/my-large.cnf /usr/share/doc/mysql-server-5.1.71/my-medium.cnf /usr/share/doc/mysql-server-5.1.71/my-small.cnf /usr/share/man/man5/openssl.cnf.5ssl.gz Or /usr/share/mysql/my-huge.cnf /usr/share/mysql/my-innodb-heavy-4G.cnf /usr/share/mysql/my-large.cnf /usr/share/mysql/my-medium.cnf /usr/share/mysql/my-small.cnf Stop mysql # service mysqld stop Stopping mysqld: [ OK ] backup the original my.cnf file. # mv /etc/my.cnf /etc/my.cnf.original MoveRead More…