MySQL is an open-source relational database management system. A relational database organizes data into one or more data tables in which data types may be related to each other; these relations help structure the data.

It’s free and open-source software under the terms of the GNU License, and is also available under a variety of proprietary licenses.

chrome fv2MgTNCAE - Backup WordPress files and database via SSH

Backup WordPress files and database via SSH

This one-liner will backup your WordPress files and database into a directory name with today’s date. mkdir -p ../backup/$(date +%Y-%m-%d) ; mysqldump $(grep DB_NAME wp-config.php | grep -v WP_CACHE_KEY_SALT | cut -d \' -f 4) | gzip > ...

image 2 - [ERROR] Unknown/unsupported storage engine: InnoDB

[ERROR] Unknown/unsupported storage engine: InnoDB

MariaDB service failed due to insufficient space on /var partition. After removing the log/backup files, MySQL failed to start with the error: service mysqld status Jan 24 08:34:07 systemd[1]: Starting MariaDB database server…Jan...

image 7 - Change the Timezone for MySQL

Change the Timezone for MySQL

Check the current timezone from MySQL: SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP); OR select now(); To check where the timezone is loaded from use: SELECT @@session.time_zone; SELECT @@global.time_zone; If it is set to SYSTEM then it is using either...

Cover Image by MilesAndryPrower on DeviantArt

Dumping specific tables in MySQL using mysqldump

For high-traffic websites, I advise developing a stagging website if you make significant updates or even switch the WordPress theme entirely. But one significant problem I encountered while moving from the staging site to the live one is that all...

Cover Image by MilesAndryPrower on DeviantArt

Auto-restart MySQL & MySQL Router if it crashes

Here is a small script that will restart the MySQL service in case it crashes. * * * * * /sbin/service mysql status || service mysql start Add it to /etc/crontab to run every minute. More complex script that does the same thing 😀 #!/bin/sh...

image 39 - PHPMyAdmin doesn't show all databases in cPanel

PHPMyAdmin doesn’t show all databases in cPanel

New databases that are created in cPanel are not visible in PHPMyAdmin, but if you assign a user to it and access it as that user, then you can use it. The first thing to check is if the database is visible via CMD: mysql -uCPANEL_USERNAME -p If the...