MySQL

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.

www.mysql.com

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...

error phpmyadmin cpanl - PHPMyAdmin Access denied for user X @ localhost

PHPMyAdmin Access denied for user X @ localhost

When you can’t log in to PHPMyAdmin from within cPanel it’s mainly one of two reasons: When you reset the password for that user, MySQL password wasn’t changeduser has a custom .my.cnf file with defined logins for mysql Step 1...

image 80 - Create a new MySQL user dedicated to backups

Create a new MySQL user dedicated to backups

I recommend setting a new MySQL user for backups and never using the root MySQL account to do backups. Step 1. Log on to MySQL as root: mysql -u root -p Step 2. Create a new user and grant all necessary permissions: CREATE USER...

image 79 - Change MySQL data directory in PHPMyAdmin

Change MySQL data directory in PHPMyAdmin

In a recent article, I discussed many methods for removing the large ibdata file, one of which involves transferring the MySQL data directory to a different partition. However, if you do so, you must also inform PHPMyAdmin of the location of the...

image 34 - MySQL: 5 ways to move data from huge ibdata file to .ibd files

MySQL: 5 ways to move data from huge ibdata file to .ibd files

ibdata file is used to store all tables of databases that use the innoDB engine, so if you delete it, you will lose all data. To keep each database files in a separate file add innodb_file_per_table in your my.cnf file under [mysqld] section. Here...