Kategoriearchive: mysql


[ERROR] Error in accept: Too many open files 1

With some versions of MariaDB, the server could stop responding to sql queries. service mysql status shows mysql[413]: ERROR 23 (HY000) at line 1: Out of resources when opening file ‘./…’ (Errcode: 24 “Too many open files”) [ERROR] Error in accept: Too many open files To adjust the limits of […]


mysql-replication – Could not parse relay log event entry

When mysql shows Slave_IO_Running and Slave_SQL_Running is false, then there is much evidence that the current slave relay log is broken. show slave status \G then looks for example like this: mysql> show slave status \G *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: master.example.com Master_User: […]


mysqldump –ignore-databases 2

With mysqldump it is not possible by the parameters to exclude individual databases. However, the database can be easily queried from the information_schema and this makes an exclude. mysqldump –databases `mysql –skip-column-names -e “SELECT GROUP_CONCAT(schema_name SEPARATOR ‘ ‘) FROM information_schema.schemata WHERE schema_name NOT IN (‘mysql’,’performance_schema’,’information_schema’, ‘db_test’);”` >/dump.sql Thanks to Ronald […]


secure MySQL-replication with ssl 1

To secure replication over ssl, mysql must support ssl. mysql -u root -p show variables like ‘%ssl%’; If the result looks like this ssl is not configured yet. have_openssl DISABLED have_ssl DISABLED ssl_ca ssl_capath ssl_cert ssl_cipher ssl_key First, the directory for the ssl-keystore is created on both servers. mkdir -p […]


mysql – log queries

You can either put a log file for all queries (mysqld –log=log_file_name or log = log_file_name in your my.cnf) or write the queries in table mysql.general_log. The use of the table can be done without restarting mysqld and the stored values could be filtered much easier. The table can create […]


restore the debian-sys-maint MySQL user

If you’ve accidentally deleted the debian-sys-maint user, you can easily re-create the user. The password is stored in /etc/mysql/debian.cnf: # Automatically generated for Debian scripts. DO NOT TOUCH! [client] host = localhost user = debian-sys-maint password = TOP-SECRET socket = /var/run/mysqld/mysqld.sock [mysql_upgrade] host = localhost user = debian-sys-maint password = […]


problems upgrading to mysql 5.5.33 on debian wheezy 1

I had a few problems with the update of the MySQL server from 5.5.31 to 5.5.33. apt-get upgrade only led to Error: Sub-process /usr/bin/dpkg returned an error code (1). For me it has helped to enter the full path for log-bin in /etc/mysql/my.cnf and .to set innodb_data_home_dir. I changed log-bin […]