Plesk

Upgrade of MySQL/MariaDB schema with mysql_upgrade fails with the error: Error: Incorrect database name ‘#mysql50#.ssh’

Symptoms

Cause

Folder with dot (".") in the name in MySQL/MariaDB datadir directory prevents correct execution of mysqlcheck command.

Resolution

Note: MySQL/MariaDB datadir location is defined in my.ini or my.cnf file. By default, it is either /var/lib/mysql (Linux) or "%plesk_dir%DatabasesMySQLdata" or "%plesk_dir%MySQLData" (Windows )

For Linux

  1. Connect to the server using SSH

  2. List directories having dot "." in the name using the command below:

    # ls -la /var/lib/mysql | grep ^d | egrep '.'

  3. Move the directory to another location, e.g.:

    # mv /var/lib/mysql/.directory /root/

For Windows

  1. Connect to the server using RDP
  2. Navigate to the datadir folder "%plesk_dir%DatabasesMySQLdata" or "%plesk_dir%MySQLData"
  3. Find the directory having the dot "." in the name and move it to another location.
Exit mobile version