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

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

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

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

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

Shell Script to Backup All MySQL databases

Here is a simple bash script that I use to backup all mysql databases from the server: #! / bin / bash TIMESTAMP = $ (date + "% F") //backups will be stored in /backup/mysql BACKUP_DIR = "/ backup / mysql" MYSQL = / usr / bin / mysql MYSQLDUMP = /...

Remove shell script after usage

Here is a small script that does two things: Determinate script’s locationDelete the file #!/usr/bin/env bash // determinate where the script is SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) //...

MySQL connections work only with localhost and not 127.0.0.1

Recently encountered a strange issue on client VPS that MySQL connections were working only when using localhost and not with 127.0.0.1 This was due to the fact that the client had enabled skip_name_resolve in his my.cnf file which prevents MySQL to...

Different Ways to Check MySQL version in cPanel or Linux

By far MySQL is the most popular Relational database management system and knowing which MySQL version you are running can be important in some situations. Here are different ways to check the version of the MySQL server installed on your WHM/...

Cover Image by MilesAndryPrower on DeviantArt

MySQL Database Vulnerability Scanning

Here is how to check MySQL databases for malware: Open up PHPMyAdminLook for anything ‘weird’ It’s that simple. What’s ‘weird’ you ask? Well, anything that’s ‘not supposed to be in the database’. What to look for? Here are some examples of items...