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

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: 6 ways to move data from huge ibdata file to .ibd files

MySQL: 6 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...

mysql backup script - Shell Script to Backup All MySQL databases

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 script - Remove shell script after usage

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