The last CiviCRM upgrade I was running, I received a couple of the same DB errors. Sanitized, minimally, the error was as follows:
#7 /srv/www/sites/d1.orgname.org/www/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /srv/www/sites/d1.orgname.org/www/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("CREATE OR REPLACE VIEW civicrm_domain_view AS SELECT * FROM civicrm_domain")
Does that mean that CiviCRM has lost some of its MySQL DB permissions and I must rebuild the DB (according to these instructions) ?
I went looking for where in the CiviCRM source code that view is mentioned, and found:
$ grep -r civicrm_domain_view *
CRM/Core/DAO.php: $dao->query('CREATE OR REPLACE VIEW civicrm_domain_view AS SELECT * FROM civicrm_domain');
CRM/Core/DAO.php: $dao->query('DROP VIEW IF EXISTS civicrm_domain_view');
CRM/Core/DAO.php: $dao->query('DROP VIEW IF EXISTS civicrm_domain_view');
CRM/Core/DAO.php: $dao->query('DROP VIEW IF EXISTS civicrm_domain_view');
I tried running this via PHPMyAdmin:
SELECT *
FROM civicrm_domain_view;
And receive an error that the view does not exist. "#1146 - Table 'd1_civicrm.civicrm_domain_view' doesn't exist"
Next I tried executing:
CREATE OR REPLACE VIEW civicrm_domain_view AS SELECT * FROM civicrm_domain
which told me the MySQL ID did not have permissions to create the view.
So I checked, what do you know that was not a permission I granted to the CiviCRM ID. I provisioned the MySQL account according to these instructions. They do not state that the Create_view_priv perm is required, if this is even the correct perm. (I just saw the word "view" and looked there first.)
Suggestions?
I am thankful,
Michael