mysql
Reset MySQL root password on Bitnami server
To reset MySQL root password on Bitnami server, first check MySQL server version you are running. mysql –version Create a file vi…
MariaDB Change Open Files Limit
When using systemctl, you can set value for open_files_limit in my.cnf file. Default installation of MariaDB 10 have open_files_limit set to 16384.…
MySQL Can’t create new tempfile
When i try to repair a crashed database table, i get error mysql> repair table visitorstats_sessions; +————————————-+——–+———-+————————————————————————+ | Table | Op |…
Split mysqldump backup file into tables
I had to restore a large MySQL backup file. When restoring one of the table resulted in error. To debug the error,…
Auto Restart MySQL if Crashed
This bash script is used to auto-restart MySQL or MariaDB database if it crashes or stops for any reason. Create file mkdir…
Find MySQL Database and Table Size
To find the size of databases using SQL command, run the following SQL in MySQL prompt. Example FInd disk usage by tables…
Percona Monitoring and Management
Percona Monitoring and Management is an Open Source monitoring software for MySQL, PostgreSQL and MongoDB. https://www.percona.com/software/database-tools/percona-monitoring-and-management It is based on grafana and…
MySQL ERROR Unable to create or change a table without a primary key
When trying to restore a database backup to Managed DigitialOcean MySQL 8 database, i get following error root@ocp:~# mysql -u doadmin -p’BKwsQcqEGbSV3w’…
ERROR 1118 Row size too large Changing some columns to TEXT or BLOB may help.
When restoring a MySQL database, i get error root@server:~# mysql production < db.sql ERROR 1118 (42000) at line 733: Row size too…
MariaDB ERROR 1524 Plugin unix_socket is not loaded
After upgrading MariaDB on Ubuntu server, i got following error root@server:~# mysql ERROR 1524 (HY000): Plugin ‘unix_socket’ is not loaded root@server:~# Users…
MySQL Initialize Data Directory
To initialize the MySQL data directory, run This will create /var/lib/mysql directory. For some versions of MySQL you can use Example See…