PleskMainDBException...help, I'm sooo lost

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
wegngis
Forum User
Forum User
Posts: 22
Joined: Tue Aug 15, 2006 2:11 pm

PleskMainDBException...help, I'm sooo lost

Unread post by wegngis »

So, I ran an update to the Plesk base packages yesterday and now plesk is hosed. My websites running on mySQL are "mostly working" but some elements are not. At this point I am so turned around it's not even funny, so I'm begging for help! Here's what Plesk shows me when I try to log in:

Code: Select all

ERROR: PleskMainDBException
MySQL query failed: Can't open file: 'misc.ibd' (errno: 1)

0: /usr/local/psa/admin/plib/common_func.php3:234
	db_query(string 'select param, val from misc')
1: /usr/local/psa/admin/plib/common_func.php3:471
	get_param(string 'mysql41_compatible')
2: /usr/local/psa/admin/plib/common_func.php3:368
	db_set_names()
3: /usr/local/psa/admin/plib/common_func.php3:347
	db_connect_real(string 'localhost', string 'admin', string '********', string 'psa')
4: /usr/local/psa/admin/plib/common_func.php3:327
	db_connect()
5: /usr/local/psa/admin/auto_prepend/auth.php3:85
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

Looks like your psa database is damaged. Please check if you didn't fill up your hard drive. You may be able to restore your psa database from /var/lib/psa/dumps.
Lemonbit Internet Dedicated Server Management
wegngis
Forum User
Forum User
Posts: 22
Joined: Tue Aug 15, 2006 2:11 pm

Unread post by wegngis »

Yes, one of the partitions did, in fact, fill up. There was an auto-backup that went rampant and filled up a 4GB partition. I cleaned it out and there is plenty of space now.

I've never had to restore the psa database. Should I be going after one of the mysql.daily.dump files?
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

You can use the most recent daily dump or the preupgrade dump. Just take the most recent dump before your system was hosed.
Lemonbit Internet Dedicated Server Management
wegngis
Forum User
Forum User
Posts: 22
Joined: Tue Aug 15, 2006 2:11 pm

Unread post by wegngis »

So, these daily dumps are mysql exports? If so, are they of all the databases on the system? Is there a way to just extract the psa database?
wegngis
Forum User
Forum User
Posts: 22
Joined: Tue Aug 15, 2006 2:11 pm

Unread post by wegngis »

Ok, I just realized that this is probably just the psa database based on the fact of where it's dumping.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

Yep, it's just the psa db. You can also just gunzip those files and open them in a text editor to see what they are.
Lemonbit Internet Dedicated Server Management
wegngis
Forum User
Forum User
Posts: 22
Joined: Tue Aug 15, 2006 2:11 pm

Unread post by wegngis »

Thanks for all your input. I tried to import, but no luck:

Code: Select all

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql -u admin -p psa < mysql.daily.dump.1' at line 1
I thought maybe I has to drop the psa database, but it won't let me do that either. :?: :?:

I'll take a look at the file right after I hit 'Submit'
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

You should be able to login using mysql -uadmin -p`cat /etc/psa/.psa.shadow`. First drop the psa database (sorry, mod_security won't let me post the exact syntax for that operation on this forum, but it involves typing the words DROP, DATABASE and psa and finishing with a ';'). Quit (type quit) and then run:

Code: Select all

mysql -uadmin -p`cat /etc/psa/.psa.shadow` < mysql.daily.dump.0
The psa, mysql and horde db are backed up in those dumps, so you might get an error about not being able to restore the horde db. Just ignore it. If you want to restore your horde db, you'll have to drop it before the restore operation.
Lemonbit Internet Dedicated Server Management
wegngis
Forum User
Forum User
Posts: 22
Joined: Tue Aug 15, 2006 2:11 pm

Unread post by wegngis »

Well, I tried to drop the psa database (drop, database psa), but it wouldn't let me.

Code: Select all

ERROR 1051 (42S02): Unknown table forwarding,BackupsScheduled,dom_level_usrs,module_cs_gs_configs,dom_param,report,resp_freq,sa_conf,s'
So, I switch to the psa database & tried to drop the tables and it said they didn't exist. :evil: :x Very frustrating.

(Commas inserted in syntax to get around mod_security)

Code: Select all

mysql> drop, table, forwarding;
ERROR 1051 (42S02): Unknown table 'forwarding'
wegngis
Forum User
Forum User
Posts: 22
Joined: Tue Aug 15, 2006 2:11 pm

Unread post by wegngis »

FINALLY figured it out. I solved the problem by deleting files/folders in the data portion of my MySQL installation. Once done, I could import the daily dump just fine.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

Yeah, those missing files might have made it hard to drop the db the regular way. :) Glad to hear you figured it out (and remember backing up is a good thing).
Lemonbit Internet Dedicated Server Management
wegngis
Forum User
Forum User
Posts: 22
Joined: Tue Aug 15, 2006 2:11 pm

Unread post by wegngis »

NOOOOO. When I rebooted the server it went back to being hosed.......what the heck is wrong with this machine????????
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

Filled up the partition again?
Lemonbit Internet Dedicated Server Management
wegngis
Forum User
Forum User
Posts: 22
Joined: Tue Aug 15, 2006 2:11 pm

Unread post by wegngis »

No, at least plesk is reporting that it's about 50% full or so.
Post Reply