Sunday, 8 July 2018

[MySQL/MariaDB] About Timeout

There are 3 kinds of timeout in MySQL or MariaDB and you can change timeout modifying 'my.cnf' or executing queries.

1. CONNECT_TIMEOUT

For bad handshake timeout. When MySQL client try to connect to mysqld(daemon), CONNECT_TIMEOUT is maximum time to wait connect packet for mysqld.

About errors.
1) Aborted_connects : FAILED TO CONNECT. When connecting to server, it is failed to connect.
2) Aborted_clients : CANCEL CONNECTION FORCIBLY. When connected to server, server close connection forcibly.


2. INTERACTIVE_TIMEOUT

This is timeout in interactive mode. The interactive mode means console mode in prompt or terminal mode.
It is maximum time that wait to receive request(Query) from client.

About Errors
ERROR 2006: MySQL server has gone away  No connection. Trying to reconnect...  Connection id:    12002  Current database: xxx


3. WAIT_TIMEOUT

This is timeout in not interactive mode likes in applications for database. It is maximum time that wait to receive request(Query) from client.














References : http://www.mysqlkorea.com/gnuboard4/bbs/board.php?bo_table=community_04&wr_id=705

[MySQL/MariaDB] Plugin 'unix_socket' is not loaded

When use mysql -u root -p command, I met "Plugin ‘unix_socket’ is not loaded" message. This issue relates to Unix authentication plugin.





Solution

1. Edit 50-server.cnf file




2. Add option




3. Restart MariaDB