Table of Contents

Installation on Ubuntu

wget https://repo.percona.com/apt/percona-release_0.1-3.$(lsb_release -sc)_all.deb
dpkg -i percona-release_0.1-3.$(lsb_release -sc)_all.deb
apt-get update
apt-get install percona-server-server-5.7

Create UTF-8 Database and User

CREATE DATABASE `mydb` CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL ON `mydb`.* TO `username`@localhost IDENTIFIED BY 'password';

Disable MySQL Strict Mode

Change the following line in /etc/mysql/percona-server.conf.d/mysqld.cnf from

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

to

sql_mode=NO_ENGINE_SUBSTITUTION

Dump/Restore

Dump ALL MySQL Databases

mysqldump --user=$USER --password=$PASSWORD -A > /path/to/dumpfile.sql

Dump Individual or Multiple MySQL Databases

mysqldump --user=$USER --password=$PASSWORD --databases DB_NAME1 DB_NAME2 DB_NAME3 > /path/to/dumpfile.sql

Dump only certain tables from a MySQL Database

mysqldump --user=$USER --password=$PASSWORD --databases DB_NAME --tables TABLE_NAME > /path/to/dumpfile.sql

Restore A Database

mysql --user=$USER --password=$PASSWORD DB_NAME < /path/to/dumpfile.sql

Restore All Databases

mysql --user=$USER --password=$PASSWORD < /path/to/dumpfile.sql

Disable InnoDB (to save memory for low-end box)

skip-innodb
default-storage-engine=myisam

Add to the `[mysqld]` section inside your `my.cnf`

References: