How to back up and restore a MYSQL database by command line

Here is how to back up and restore a MYSQL database by command line Back up a MYSQL database: Code: ——— mysqldump –opt -Q -u dwhs_dwhs -p dwhs_wrdprss*A* > /home/dwhs/workroom/dwhs_wrdprss1.sql ——— Restore a MYSQL database: Code: ——— mysql -u dwhs_dwhs Continue Reading

How to upgrade mysql on a Cpanel Cloud Linux server

How to install new package: 1) yum install governor-mysql –enablerepo=cloudlinux-updates-testing 2) /usr/share/lve/dbgovernor/mysqlgovernor.py –install For upgrading to MySQL 5.5(for example), you should to do: 1) /usr/share/lve/dbgovernor/db-select-mysql –mysql-version=mysql55 2) /usr/share/lve/dbgovernor/db-select-mysql –install-now 3) You will need cPanel to rebuild php through easyapache next Continue Reading

mysql find and replace table

How to Find & Replace Data in MySQL To find a string in a certain field and replace it with another string: update [table_name] set [field_name] = replace([field_name],'[string_to_find]’,'[string_to_replace]’); (Don’t forget to remove the [] bars!) You can run this from Continue Reading

To install MySQL governor on your Cpanel Cloud Linux server

To install MySQL governor on your server: yum remove db-governor db-governor-mysql # you can ignore errors if you don’t have those packages installed yum install governor-mysql –enablerepo=cloudlinux-updates-testing /usr/share/lve/dbgovernor/mysqlgovernor.py –install   * The installation currently supports only cPanel & DirectAdmin servers. Continue Reading