Configure Row-Based or Mixed Mode Replication in Mysql

Source: http://mysql.wingtiplabs.com/documentation/row639ae/configure-row-based-or-mixed-mode-replication http://www.xaprb.com/blog/2012/08/23/avoiding-statement-based-replication-warnings/ By default, MySQL binary logging and replication is statement-based: when the master server commits a change, it writes the SQL statement into its binary log, and any slaves that replicate it execute the same SQL statement into their own database. MySQL also supports row-based replication: the master server logs the data affected … Read more

Optimize only fragmented tables in MySQL

When you are using MySQL, you will (likely) have tables that can be fragmented. In MySQL terms this is called “OPTIMIZE”. You could simply OPTIMIZE every table in every database, but during an OPTIMIZE, the tables are locked, so writing is not possible. To minimize the time that MySQL will be locked (and results cannot … Read more

Mysql Report

Another tool of a similar nature is the MySQLReport tool which can be found at http://hackmysql.com. Information can be found here about how to read and analyse the report that is produces from this link http://hackmysql.com/mysqlreportguide. You can load it up remotely and build it on your server in a similar way making use of … Read more

Using Mysqltuner

Download/Installation Simple You can download the entire repository by using ‘git clone’ followed by the cloning URL above. The simplest and shortest method is: Change the permissions you can execute it without calling perl directly. [stextbox id=”warning”]——– Recommendations —————————————————–[/stextbox] General recommendations: Run OPTIMIZE TABLE to defragment tables for better performance MySQL started within last 24 … Read more

Mysql Check/Repair Database

Check a Specific Table in a Database If your application gives an error message saying that a specific table is corrupted, execute the mysqlcheck command to check that one table. The following are some of the key options that you can use along with mysqlcheck. -A, –all-databases Consider all the databases -a, –analyze Analyze tables -1, –all-in-1 Use … Read more

Export/Import Mysql Database

Export a database mysql Plesk Server To export a single table from your database you would use the following command: Import a database or table # mysql -p -u username database_name < file.sql [/bash] For Plesk server [bash] # mysql -u admin -p`cat /etc/psa/.psa.shadow` database < /tmp/database.sql [/bash] To import a single table into an ... Read more

Move Data from Slaved Drive – Plesk

First you will want to set up subscriptions for the domains in the plesk panel. Once they are created you can run the commands below: Here are a few commands that should help. 1.) rsync example. This will move the data from one drive to the other. rsync -avz /mnt/slave/var/www/vhosts/"domain name"/httpdocs /var/www/vhosts/"domain name"/httpdocs You will … Read more