Database are not listed in Plesk web interface.

Refers to:

  • Plesk for Linux
  • Plesk 11.5 for Windows

Created:

2016-11-16 12:45:37 UTC

Modified:

2017-02-14 04:54:39 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Database are not listed in Plesk web interface.

Symptoms

Databases are absent in Plesk Control Panel, but physically present in MySQL server and they could be accessed via PHPmyAdmin.

Cause

Absent records in Plesk database in data_bases table.

Resolution

Absent records could be retrieved from Plesk database daily dumps:

  1. Create Plesk database dump:

    [root@dbard ~]# mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` psa > /var/lib/psa/dumps/manual.psa.dump.`date +%Y%m%d.%H%M`
  2. Check that data_bases table is empty in psa database:

    [root@server ~]# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e"select * from data_bases"
    [root@server ~]#
  3. Check old Plesk database dumps in folder /var/lib/psa/dumps :

    [root@server ~]# ll /var/lib/psa/dumps/mysql.daily.dump.*
    -rw------- 1 root root 213991 Feb 11 00:22 /var/lib/psa/dumps/mysql.daily.dump.0.gz
    -rw------- 1 root root 208485 Feb 6 00:21 /var/lib/psa/dumps/mysql.daily.dump.1.gz
    -rw------- 1 root root 205542 Feb 4 00:21 /var/lib/psa/dumps/mysql.daily.dump.2.gz
  4. Review content of dump to find records for data_bases table:

    [root@server ~]# zless /var/lib/psa/dumps/mysql.daily.dump.0.gz | grep "Dumping data for table \\`data_bases\\`" -A8
    -- Dumping data for table `data_bases`
    --
    LOCK TABLES `data_bases` WRITE;
    /*!40000 ALTER TABLE `data_bases` DISABLE KEYS */;
    INSERT INTO `data_bases` VALUES (1,'wordpress_d','mysql',1,1,NULL),(2,'modx_c','mysql',2,1,NULL);
    /*!40000 ALTER TABLE `data_bases` ENABLE KEYS */;
    UNLOCK TABLES;
  5. Insert these records in psa database:

    [root@server ~]# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e"INSERT INTO data_bases VALUES (1,'wordpress_d','mysql',1,1,NULL),(2,'modx_c','mysql',2,1,NULL);"
    [root@server ~]#
Have more questions? Submit a request
Please sign in to leave a comment.