Aria engine is not enabled or did not start

When starting MaraDB, i got error root@localhost:/var/log/mysql# cat error.log 2020-01-19 6:18:46 0 [ERROR] mysqld: Can’t lock aria control file ‘/var/lib/mysql/aria_log_control’ for exclusive use, error: 11. Will retry for 30 seconds 2020-01-19 6:19:17 0 [ERROR] mysqld: Got error ‘Could not get an exclusive lock; file is probably in use by another process’ when trying to use … Read more

Install MariaDB 10.3 on CentOS 7

MariaDB

MariaDB is an Open Source MySQL drop-in replacement. MariaDB provides a repository for various operating systems at https://mariadb.org/download/?tab=repo-config To install MariaDB 10.3 on CentOS 7, create a file vi /etc/yum.repos.d/MariaDB.repo Add [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.3/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 Install the MariaDB server and client with yum install MariaDB-server MariaDB-client Enable MariaDB to start … Read more

MySQL ERROR Access denied you need SUPER privilege for this operation

MySQL

WHen restoring a MySQL database, i get following error root@ns3043014:~# mysql -u NEW_DB_USER -p’PASSOWRD_HERE’ DB_NAME < BACKUP_FILE.sql ERROR 1227 (42000) at line 4382: Access denied; you need (at least one of) the SUPER privilege(s) for this operation root@ns3043014:~# I opened the file in vim editor. On checking line 4382, i found following /*!50013 DEFINER=`OLD_DB_USER`@`localhost` SQL ... Read more

MySQL Recovering after a crash using tc.log

MySQL

After MySQL upgrade from MraiaDB 10.1 to 10.3, MySQL failed to start. On checking log, found root@localhost:/var/log/mysql# cat error.log 2019-09-23 6:30:10 0 [Note] InnoDB: Using Linux native AIO 2019-09-23 6:30:10 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2019-09-23 6:30:10 0 [Note] InnoDB: Uses event mutexes 2019-09-23 6:30:10 0 [Note] InnoDB: Compressed tables … Read more

MariaDB DEFAULT NULL ERROR 1064 (42000)

When trying to restore a MySQL databse bakcup taken on MySQL 5.7 server to MairaDB 10.1 server i get following error. root@server:~# mysql -u vcon_user -p vcon_sbc < vcon_sbc.sql Enter password: ERROR 1064 (42000) at line 287: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version ... Read more

Install MySQL as Service in Windows

MySQL

When you manually install MySQL from zip, no MySQL service get created. To run MySQL Server as a service in windows, go to the folder where “mysqld.exe” is located and run following command mysqld.exe install If you want a differnt name for service, run mysqld.exe install SERVICE_NAME You can delete service with command sc delete … Read more

MySQL 8 apt Error The following signatures were invalid

When trying to install MySQL 8 on Ubuntu 18.04, i get following error root@ssdnodes-45790:~# apt update Ign:1 http://download.webmin.com/download/repository sarge InRelease Hit:2 http://download.webmin.com/download/repository sarge Release Get:3 http://repo.mysql.com/apt/ubuntu bionic InRelease [16.9 kB] Hit:5 http://archive.ubuntu.com/ubuntu cosmic InRelease Hit:6 http://archive.ubuntu.com/ubuntu cosmic-security InRelease Err:3 http://repo.mysql.com/apt/ubuntu bionic InRelease The following signatures were invalid: EXPKEYSIG 8C718D3B5072E1F5 MySQL Release Engineering Hit:7 http://archive.ubuntu.com/ubuntu cosmic-updates … Read more

MySQL Got error 24 Too many open files

For ubuntu, see Ubuntu 18.04 MariaDB 10.2 Too many open files On taking MySQL backup with mysqldump, i get following error mysqldump: Got error: 1030: “Got error 24 “Too many open files” from storage engine MyISAM” when using LOCK TABLES mysqldump: Error: ‘Out of resources when opening file ‘/tmp/#sql_f68_2.MAD’ (Errcode: 24 “Too many open files”)’ … Read more

MySQL Out of resources when opening file

MySQL open_files_limit

On a MySQL server got the error Out of resources when opening file ‘/tmp/#sql_318d_0.MAD’ (Errcode: 24 “Too many open files”) This is because number of files allowed to open by MySQL is set to too low. To view current settings, in MySQL command prompt, run select @@open_files_limit; Or show variables like “open%”; To increase the … Read more

mysqldump packet bigger than max_allowed_packet

MySQL

When backing up a MySQL database using mysqldump command, got following error [root@vps189 ~]# mysqldump sok_main > sok_main.sql mysqldump: Error 2020: Got packet bigger than ‘max_allowed_packet’ when dumping table `wp_options` at row: 7068 [root@vps189 ~]# To fix, you need to edit MySQL config file vi /etc/my.cnf Add following under [mysqld] section max_allowed_packet=2G Now restart MySQL … Read more

Reset MySQL 5.7 root password on Ubuntu 16.04

First stop MySQL with command service mysql stop Now run mysqld_safe –skip-grant-tables On Ubuntu 16.04 server with MySQL 5.7, when i run, i get following error. root@sok-06:~# mysqld_safe –skip-grant-tables 2018-12-29T06:13:26.191918Z mysqld_safe Logging to syslog. 2018-12-29T06:13:26.195961Z mysqld_safe Logging to ‘/var/log/mysql/error.log’. 2018-12-29T06:13:26.199396Z mysqld_safe Directory ‘/var/run/mysqld’ for UNIX socket file don’t exists. root@sok-06:~# To fix, this error, create … Read more