• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Table 'psa.mass_mail_domains' doesn't exist

breun

Golden Pleskian
After upgrading from Plesk 8.1.0 to 8.1.1 I tried to remove a domain and got the following error:

ERROR: PleskMainDBException

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

0: /usr/local/psa/admin/plib/common_func.php3:211
db_query(string 'DELETE FROM mass_mail_domains WHERE dom_id IN (33)')
1: /usr/local/psa/admin/plib/mass-mail/MassMailManager.php:118
MassMailManager::eek:nDomainsDelete(array)
2: /usr/local/psa/admin/plib/class.PhDomain.php:260
PhDomain->reset(integer '0', boolean true, boolean false)
3: /usr/local/psa/admin/plib/class.BsDomain.php:313
BsDomain->reset(integer '0')
4: /usr/local/psa/admin/plib/class.BsDomain.php:307
BsDomain->delete(integer '0')
5: /usr/local/psa/admin/plib/class.BsDomain.php:540
mdeleteDomains(array)
6: /usr/local/psa/admin/plib/class.Manager.php:352
Manager->removeDomains(array)
7: /usr/local/psa/admin/htdocs/domains/domains.php3:209

I checked another Plesk 8.1.1 server and it had the tables mass_mail, mass_mail_clients and mass_mail_domains while the other server did not. Since they were all empty I figured I could just create those tables with the same structure on the server I got the error.

Code:
# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa
mysql> CREATE TABLE `mass_mail` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(255) character set utf8 NOT NULL default '',
  `from_email` varchar(255) character set utf8 NOT NULL default '',
  `to_admin` enum('false','true') NOT NULL default 'false',
  `to_clients` enum('false','true') NOT NULL default 'false',
  `to_clients_mode` enum('all','select','except') NOT NULL default 'all',
  `to_domains` enum('false','true') NOT NULL default 'false',
  `to_domains_mode` enum('all','select','except') NOT NULL default 'all',
  `subject` varchar(255) character set utf8 NOT NULL default '',
  `body` text character set utf8 NOT NULL,
  `cdate` date default NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
mysql> CREATE TABLE `mass_mail_clients` (
  `mm_id` int(10) unsigned NOT NULL default '0',
  `cl_id` int(10) unsigned NOT NULL default '0',
  UNIQUE KEY `mm_id_2` (`mm_id`,`cl_id`),
  KEY `mm_id` (`mm_id`),
  KEY `cl_id` (`cl_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
mysql> CREATE TABLE `mass_mail_domains` (
  `mm_id` int(10) unsigned NOT NULL default '0',
  `dom_id` int(10) unsigned NOT NULL default '0',
  UNIQUE KEY `mm_id_2` (`mm_id`,`dom_id`),
  KEY `mm_id` (`mm_id`),
  KEY `dom_id` (`dom_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
mysql> quit

After creating these tables I was able to remove the domain. I thought I'd post this info here in case anyone else encounters this problem.
 
looks like upgrade was not full,

and db was not upgraded properly,

generally, you need to restore psa database from backup before upgrade and try to upgrade once more.
 
Back
Top