MySQL Errors

The MySQL error log is controlled by the log-error variable in my.cnfCommon locations are: /mysql/data or /var/log
The MySQL slow query log is controlled by the slow-query-log-file variable in my.cnf

Server Error Codes

ERROR 3 (HY000) at line x: Error writing file '...' 

ERROR 3 (HY000) at line 1: Error writing file '/tmp/myfile.txt' (Errcode: 28 - No space left on device)

See OS Error Code 28 later on this page.

ERROR 1086 (HY000): File '...' already exists.

This error will be raised when you attempt to SELECT ... INTO OUTFILE where the target file already exists.

Database to Text

ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option

ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

This error will be raised when you attempt to SELECT ... INTO OUTFILE where the target file is outside the location specified by the secure_file_priv parameter.
Check the correct location with...

SELECT @@secure_file_priv;

[MY-000011]: Can't unlock file (OS errno %d - %s)

[MY-000035] [Server] Disk is full writing '...' 

[ERROR] [MY-000035] [Server] Disk is full writing './binlog.000023' (OS errno 28 - No space left on device). Waiting for someone to free space... Retry in 60 secs. Message reprinted in 600 secs.

See OS Error Code 28 later on this page.

[ERROR] [MY-000035] [Server] Disk is full writing './relay-bin.000005' (OS errno 28 - No space left on device). Waiting for someone to free space... Retry in 60 secs. Message reprinted in 600 secs.

See OS Error Code 28 later on this page.

[MY-000067] [Server] unknown variable ...

[ERROR] [MY-000067] [Server] unknown variable 'symbolic-link=0'.

Caused by a typo. In this case, the real variable is called symbolic-links (which is deprecated so, ideally, don't set it anyway).

[MY-010020] [Server] Data Dictionary initialization failed.

[ERROR] [MY-010020] [Server] Data Dictionary initialization failed.

See accompanying error messages.

[MY-010068] [Server] CA certificate ca.pem is self signed.

[Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.

[MY-010075] [Server] No existing UUID has been found, so we assume that this...

[Warning] [MY-010075] [Server] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: afb707fb-fa33-11ed-95d5-005056810b5a.

Informational message only.

[MY-010097] [Server] Insecure configuration for --secure-log-path: ...

[Warning] [MY-010097] [Server] Insecure configuration for --secure-log-path: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.

[MY-010140] [Server] Could not increase number of max_open_files to more than...

[Warning] [MY-010140] [Server] Could not increase number of max_open_files to more than 10000 (request: 65535)

[MY-010457] [Server] --initialize specified but the data directory has files in it.

[ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.

See also: [MY-013236][MY-011011][MY-010020]

In our case a UNIX admin had created separate mount points under /var/lib/mysql (/var/lib/mysql/log and /var/lib/mysql/backup). To work around the issue, I created a directory /var/lib/mysql/data, then edited /etc/my.cnf to change datadir from /var/lib/mysql to /var/lib/mysql/data. 

[MY-010116] [Server] /usr/sbin/mysqld (mysqld version) starting as process proc

[System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.28-20) starting as process 406143

Informational message only.

[MY-010119] [Server] Aborting

[ERROR] [MY-010119] [Server] Aborting

See accompanying error messages.

[MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete 

[System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.28-20Percona Server (GPL), Release 20, Revision fd4b5a776a6.

Informational message only.

[MY-010931] [Server] /usr/sbin/mysqld: ready for connections.

[System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.28-20'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Percona Server (GPL), Release 20, Revision fd4b5a776a6.

Informational message only.

[MY-011011] [Server] Failed to find valid data directory.

[ERROR] [MY-011011] [Server] Failed to find valid data directory.

See accompanying error messages.

[MY-011068] [Server] The syntax 'expire-logs-days' is deprecated...

[Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.

[Warning] [MY-011068] [Server] The syntax 'log_slave_updates' is deprecated and will be removed in a future release. Please use log_replica_updates instead.

[MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links...

[Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.

[MY-011263] [Server] Could not use /.../mysql-slow.log for logging

[ERROR] [MY-011263] [Server] Could not use /var/log/mysql/mysql-slow.log for logging (error 28 - No space left on device). Turning logging off for the server process. To turn it on again: fix the cause, then either restart the query logging by using "SET GLOBAL SLOW_QUERY_LOG=ON" or restart the MySQL server.

See OS Error Code 28 later on this page.

[MY-011323] [Server] X Plugin ready for connections.

[System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/lib/mysql/mysqlx.sock

Informational message only.

[MY-012144] [InnoDB] posix_fallocate(): Failed to preallocate data for file ...

[ERROR] [MY-012144] [InnoDB] posix_fallocate(): Failed to preallocate data for file myidbfile, desired size x bytes. Operating system error number 28. Check that the disk is not full or a disk quota exceeded. Make sure the file system supports this function. Some operating system error numbers are described at http://dev.mysql.com/doc/refman/8.0/en/operating-system-error-codes.html

See OS Error Code 28 later on this page.

[MY-012145] [InnoDB] Error while writing x zeroes to y

[Warning] [MY-012145] [InnoDB] Error while writing x zeroes to y

See accompanying error messages.

[MY-012638] [InnoDB] Retry attempts for writing partial data failed.

[Warning] [MY-012638] [InnoDB] Retry attempts for writing partial data failed.

See accompanying error messages.

[MY-012639] [InnoDB] Write to file ... failed at offset...

[ERROR] [MY-012639] [InnoDB] Write to file myidbfile failed at offset x, y bytes should have been written, only z were written. Operating system error number 28. Check that your OS and file system support files of this size. Check also that the disk is not full or a disk quota exceeded.

[MY-012640] [InnoDB] Error number x means 'y'

[ERROR] [MY-012640] [InnoDB] Error number 28 means 'No space left on device'

[MY-013169] [Server] /usr/sbin/mysqld (mysqld version) initializing of server in...

[System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.28-20) initializing of server in progress as process 406117

Informational message only.

[MY-013172] [Server] Received SHUTDOWN from user <via user signal>...

[System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.28-20).

Informational message only.

[MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable...

[ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.

See: [MY-010457]

[MY-013602] [Server] Channel mysql_main configured to support TLS...

[System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.

Informational message only.

[MY-013576] [InnoDB] InnoDB initialization has started.

[System] [MY-013576] [InnoDB] InnoDB initialization has started.

Informational message only.

[MY-013577] [InnoDB] InnoDB initialization has ended.

[System] [MY-013577] [InnoDB] InnoDB initialization has ended.

Informational message only.

[MY-013829] [Server] Missing data directory for ICU regular expressions:... 

[Warning] [MY-013829] [Server] Missing data directory for ICU regular expressions: /usr/lib64/mysql/private/.

TODO - what does this mean?

[Note]

[Note] Aborted connection

[Note] Aborted connection 3680 to db: 'mydb' user: 'myuser' host: 'myhost' (Got timeout reading communication packets)

[Note] Got timeout reading communication packets

TODO

[Note] Got timeout reading communication packets

[Note] InnoDB: page_cleaner: 1000ms intended loop took...

TODO

[Note] InnoDB: page_cleaner: 1000ms intended loop took 9327ms. The settings might not be optimal. (flushed=0, during the time.)

Client Error Codes

ERROR 2003 (HY000): Can’t connect to MySQL server on ‘127.0.0.1’ (111)

The number in brackets at the end seems to be relevant...(99) Cannot assign requested address(111) Connection Refused
Is MySQL Running?
Is there a firewall blocking access?

OS Error Codes

perror 28

To show error code description

11:  Resource temporarily unavailable

13: Permission denied

The command below can be useful for diagnosing permission errors  related to SELinux...cat /var/log/audit/audit.log | audit2allow -w -a

28: No space left on device