ISPConfig fail to create MySQL database

ISPConfig

Whem creating MySQL database in ISPConfig, no database get created. To debug, i disabled the cronjob. Created a database in ISPConfig control panel, run cronjob manually, it shows following error [root@vs-sok ~]# /usr/local/ispconfig/server/server.sh PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user ‘root’@’localhost’ (using password: YES) in /usr/local/ispconfig/server/plugins-available/mysql_clientdb_plugin.inc.php on line 528 11.11.2019-13:45 – ERROR – Unable … 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

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

Deploy MySQL Server in Kubernetes using Helm

To install MySQL server in Kubernetes, run helm install stable/mysql Once install is completed, you will get something like NOTES: MySQL can be accessed via port 3306 on the following DNS name from within your cluster: incendiary-monkey-mysql.default.svc.cluster.local To get your root password run: MYSQL_ROOT_PASSWORD=$(kubectl get secret –namespace default incendiary-monkey-mysql -o jsonpath=”{.data.mysql-root-password}” | base64 –decode; echo) … 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

MySQL Permission denied

After changing MySQL data directory, i get error Apr 17 03:01:20 hon-pc-01 mysqld[25298]: 180417 3:01:20 [Note] /usr/sbin/mysqld (mysqld 10.0.34-MariaDB-0ubuntu0.16.04.1) starting as process 25297 … Apr 17 03:01:20 hon-pc-01 mysqld[25298]: 180417 3:01:20 [ERROR] mysqld: Can’t create/write to file ‘/mnt/backup/mysql/aria_log_control’ (Errcode: 13 “Permission denied”) Apr 17 03:01:20 hon-pc-01 mysqld[25298]: 180417 3:01:20 [ERROR] mysqld: Got error ‘Can’t create … Read more

Change MySQL root password

If you have MYSQL root password and want to change the MySQL root password, first log in to MYSQL with the command mysql -u root -p Method 1 UPDATE mysql.user SET Password=PASSWORD(‘MYSQL_ROOT_PASSWORD’) WHERE User=’root’; FLUSH PRIVILEGES; Method 2 ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘MYSQL_ROOT_PASSWORD’; OR ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘MYSQL_ROOT_PASSWORD’; Method 3 … Read more