• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

MySQL query failed: Table 'psa.misc' doesn't exist

R

Rico Kerster

Guest
Good evening
I have googled for a suitable answer but nothing came out yet.

ERROR: PleskMainDBException
MySQL query failed: Table 'psa.misc' doesn't exist

0: /usr/local/psa/admin/plib/common_func.php3:216
db_query(string 'select param, val from misc')
1: /usr/local/psa/admin/plib/common_func.php3:513
get_param(string 'mysql41_compatible')
2: /usr/local/psa/admin/plib/common_func.php3:410
db_set_names()
3: /usr/local/psa/admin/plib/common_func.php3:389
db_connect_real(string 'localhost', string 'admin', string '********', string 'psa')
4: /usr/local/psa/admin/plib/common_func.php3:369
db_connect()
5: /usr/local/psa/admin/auto_prepend/auth.php3:87


I get this error, first I thought okay there must be a table missing ran a check and this came out:
mysql> use psa
Database changed
mysql> check table psa.misc;
+----------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+----------+-------+----------+----------+
| psa.misc | check | status | OK |
+----------+-------+----------+----------+
1 row in set (0.06 sec)

So I'm really... really confused.. okay that's one half of the "history"
I have running two MySQL Servers one on the standard port and one on 988, on both is a plesk database though I want plesk to connect to the mysqld on 988.. since the plesk installation (i.e database) on 3306 is broken (on 988 is the original database) Now I have the feeling, that plesk tries to connect to the 3306 server... in my /etc/my.cnf I specified:
port = 888
socket = /tmp/mysql.sock
... and /tmp/mysql.sock is the socket for the 988 Server and the other socket (3306) is in the mysql server's jail let's say /jail/mysql/tmp/mysql.sock.. now as far as I know:
the plesk interface has its own apache.. to where does it connect? does it take the info from /etc/my.cnf or from elsewhere? is there any way to configure that?


/etc/init.d/psa restart works without throwing an error!

Hope for help
Rico Kerster
 
probably connection to localhost:3306 is hardcoded in some plesk function.. try to enable sql requests logging in both of your mysqls and trace logs to know exactly where requests come to.. maybe sometimes it connects mysql through socket (and in this plesk works) and sometimes it connects :3306 and fails to find psa tables there..
 
Thanks dirty I managed to solve that issue

I read the init script to see how it starts the psa binary, I was expecting, that it passes some parameters to it, and that was correct, I found out that it actually read in the my.cnf but somehow it seemed to be faulty and it took the next valid place for a my.cnf which was a wrong configured one

cnf_files="/etc/my.cnf /etc/mysql/my.cnf /var/db/mysql/my.cnf"

so I edited the /etc/my.cnf to be correctly parsed and read out (must have been a typo)
Started the psa service then it was complaining that it couldn't find the socket in /var/lib/mysql/mysql.sock (and I stated, that the mysql.sock is in: /jail/mysql/tmp/mysql.sock this confused me but I was not really in the mood to find out where it took the path to /var/lib/mysql, because it was connecting to the MySQL Server and found the psa.misc table - so I just put a hardlink in order to solve that:

ln /jail/mysql/tmp/mysql.sock /var/lib/mysql/mysql.sock that's not a perfect solution but a temporary one to let plesk configure the chrooted services...

Thanks
Rico
 
Back
Top