Symptoms
-
Plesk upgrade fails during MySQL/MariaDB upgrade with one of these errors:
Got error: 1102: Incorrect database name '#mysql50#example.database' when selecting the database
Failed to install 'C:ParallelsInstallerparallelsPANEL-WIN_17.5.3dist-msi-Mic
rosoft-2003-i386mysql-admin_mu067.msi': Fatal error during installation. (Error
code 1603) -
Upgrading the MySQL/MariaDB schema with
mysql_upgradefails:Failed to ALTER DATABASE `#mysql50#.ssh` UPGRADE DATA DIRECTORY NAME
Error: Incorrect database name '#mysql50#.ssh'
Running 'mysqlcheck with default connection arguments
mysqlcheck: Got error: 1102: Incorrect database name '#mysql50#.ssh' when selecting the database
FATAL ERROR: Error during call to mysql_check for upgrading the tables names. -
There's a folder whose name starts with a dot "
." in/var/lib/mysql/directory.
Cause
The folder starting with a dot (".") in the MySQL/MariaDB datadir directory prevents the mysqlcheck command from running correctly.
Resolution
Move the dot folder outside datadir, which by default is:
-
/var/lib/mysqlon Linux -
%plesk_dir%DatabasesMySQLdataor%plesk_dir%MySQLDataon Windows
Note: If it's not any of the above, its location is defined by and can be found in the my.ini or my.cnf config files.
-
Connect to the server via SSH
-
List all dot directories in
datadir:# ls -la /var/lib/mysql | grep ^d | egrep '.'
-
Move any directory that starts with a dot to another location. For example:
# mv /var/lib/mysql/.directory /root/
- Connect to the server via RDP
- Open
datadirfolder%plesk_dir%DatabasesMySQLdataor%plesk_dir%MySQLData - Find and move any directory with a starting dot to another location.