MySQL to MariaDB and Back Again
benny Vasquez -- cPanel, Inc. Santa Clara, California | April 23th – 25th, 2018
MySQL to MariaDB and Back Again benny Vasquez -- cPanel, Inc. - - PowerPoint PPT Presentation
MySQL to MariaDB and Back Again benny Vasquez -- cPanel, Inc. Santa Clara, California | April 23th 25th, 2018 hi, I'm benny. 2 right now 3 before cPanel 4 boring 5 boring 6 enough about me, though 7 Migrating your data safely
MySQL to MariaDB and Back Again
benny Vasquez -- cPanel, Inc. Santa Clara, California | April 23th – 25th, 2018
right now
before cPanel
boring
Migrating your data safely
Migrating your data safely
Step 0: Backup!
Step 0: Backup!
Step -1: Check yo self
df ; df –I
Step 0.1: Full dumps of your database (scheme optional)
[root: ~]# mysqldump -u root -p mysql user > `date +%Y%m%d`.user_table_dump.sql [root: ~]# mysqldump -u root -p --all-databases --skip-lock-tables > `date +%Y%m%d`.alldb.sql
Step 0.2: backup of the folder(s) and configurations
Step 0.3: full server backups
The Environment(s)
Let’s get on the same page
Env{1} * CentOS 6.9 * Installed MySQL 5.5 * Installed Apache & PHP * Added WordPress Site
The Environment(s)
Env{2} * CentOS 6.9 * Installed cPanel & WHM * installed w/MySQL 5.5 * Added WordPress Site
MySQL à MariaDB
Fo’ reals this time.
6 easy steps
https://mariadb.com/kb/en/library/yum/
service mysqld stop; yum remove mysql-community-server
yum install MariaDB-server MariaDB-client
service mysql start mysql -V service mysql status
Finish the conversion
Things to keep in mind
MySQL to MariaDB; Env{1} Great Success
Env{1}: Success
3 easy steps
MySQL to MariaDB; Env{2} Great Success
Env{2}: Success
MariaDB à MySQL under 5.6
Easy peasy
6 easy steps
service mysql stop
yum remove MariaDB-server MariaDB-client
Things to keep in mind
MariaDB to MySQL, when < 5.6 Env{1} Great Success
Env{1}: Success
2 easy steps
[root: ~]# grep mysql-version /var/cpanel/cpanel.config mysql-version=5.5
/scripts/check_cpanel_rpms targets=MySQL55,MySQL56,MySQL57,MariaDB100 --fix
Env{2}: Success
MariaDB to MySQL, when < 5.6 Env{2} Great Success
MariaDB à MySQL over 5.6
ugh
7 easy steps
service mysql stop
cp -a /var/lib/mysql{,.bak}; rm -rf /var/lib/mysql; chown mysql. /var/lib/mysql
yum remove MariaDB-server MariaDB-client
https://dev.mysql.com/doc/mysql-installation-excerpt/5.7/en/linux-installation- yum-repo.html
service mysql status
Warning: swapping in place WILL corrupt your databases
MariaDB to MySQL, when ≥ 5.6 Env{1} eh Success
Env{1}: Success?
6 easy steps
cp -a /var/lib/mysql{,.bak}; rm -rf /var/lib/mysql; chown mysql. /var/lib/mysql
[root: ~]# grep mysql-version /var/cpanel/cpanel.config mysql-version=5.7
/scripts/check_cpanel_rpms –fix
service mysql status
Warning: ”downgrading” in place WILL corrupt your databases, and WILL increase headaches.
MariaDB to MySQL, when ≥ 5.6 Env{2} eh Success
Env{2}: Success?
Conclusions and take-aways
ugh
ugh.
Thank You!
benny@cpanel.net
LAMP installation, to build your env mysqldump, for your backups Install MySQL 5.7 on your server cPanel docs for upgrade scheme optional
https://go.cpanel.net/pl18
Rate My Session