Skip to main content

MySQL troubleshooting

This document describes how to resolve issues related to the MySQL service.


Cannot connect between client instance and MySQL instance in VPC

The main causes for being unable to connect to port 3306 or 3307 of the MySQL instance (cluster) are as follows:

Check availability status

A newly created DB instance is shown in the Creating status until it is ready. Connection becomes available once the instance status changes to Available.
See Instance group availability status for more details.

Instance group statusAvailability statusDescription
AVAILABLEREADYAll configurations are ready

Test DB instance connection

  1. On Linux or Unix, you can test connectivity to the DB instance via terminal.

    Replace DB-INSTANCE-ENDPOINT with the actual endpoint and PORT with the actual port.

    nc -vz "DB-INSTANCE-ENDPOINT" "PORT"

    Example:

    ubuntu@host-172-16-3-252:~$ nc -vz "DB-INSTANCE-ENDPOINT" "PORT"
    Connection to "DB-INSTANCE-ENDPOINT" (172.16.3.154) "PORT" port [tcp/mysql] succeeded!
  2. On Windows, you can test the connection using telnet.
    Telnet is only supported for connection testing purposes. No message appears on success, while an error appears on failure.

    C:\Users\Administrator>telnet "DB-INSTANCE-ENDPOINT" "PORT"
    Connecting to "DB-INSTANCE-ENDPOINT"... Could not open connection to the host, on port "PORT": Connect failed

Lost DB instance owner password

If you have lost the DB instance owner password, please contact the KakaoCloud Help Desk.

CategoryDescription
{MySQL-ADMIN-PASSWORD}⚠️ The admin password can be changed after the database is running.
⚠️ Admin passwords changed by the user after startup cannot be retrieved.

DB instance storage is full

When storage is insufficient, DB instance operations may not work properly.

▶️ Resolution: Keep storage usage below 80% by expanding the volume via the Expand MySQL instance group volumes feature. The following is an example of command syntax and return message.

mysql> create table test(test_name varchar(20), test_age int);
"No response"

Slow queries not showing in Monitoring > Log Explorer

Slow queries in MySQL are stored as files and can be viewed in Monitoring > Log Explorer.

Logs older than 5 days

By default, Log Explorer displays slow query logs for up to 5 days. Logs older than 5 days cannot be viewed.
▶️ Resolution: To view logs older than 5 days, change the storage location from file to table using Use stored procedure.

info

If you are unable to view logs within the 5-day window, please contact the KakaoCloud Help Desk.


SSH error message: Access denied

ERROR 1044 (42000): Access denied for user 'user'@'%' to database 'database'

This error occurs when creating users or granting permissions.

mysql> CREATE USER 'user'@'%' IDENTIFIED BY '1234';
mysql> GRANT ALL PRIVILEGES ON user.* TO 'user'@'%';
ERROR 1044 (42000): Access denied for user 'admin'@'%' to database 'database'

▶️ Resolution: Use the default stored procedure provided by KakaoCloud MySQL to manage accounts and permissions.
See Account settings and privileges for details.