Your database user does not have permission to create tables.
-
Hello,
Hopefully this will help someone in the future, I ran into a case where the database restore failed due to some permissions, but checking my DB Users I had the sufficient permissions required.
The errors I ran into was the restore couldn’t create or drop tables:
Database access: Direct MySQL access is not available, so we are falling back to wpdb (this will be considerably slower)
Warning: Your database user does not have permission to create tables. We will attempt to restore by simply emptying the tables; this should work as long as a) you are restoring from a WordPress version with the same database structure, and b) Your imported database does not contain any tables which are not already present on the importing site.
…
An error (1) occurred: – – the database query being run was: /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
An error (2) occurred: – – the database query being run was: /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
An error (3) occurred: – – the database query being run was: /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
An error (4) occurred: – – the database query being run was: /*!40101 SET NAMES utf8 */;
An error (5) occurred: – – the database query being run was: /*!40101 SET foreign_key_checks = 0 */;
…
Cannot drop tables, so deleting instead (DELETE FROMwp_options
)
…
Cannot create new tables, so skipping this commandIn the end I had to give up using updraft restore in favour of logging directly into phpMyAdmin and importing the database .gz file that updraft was attempting to us. Doing the import this way avoided the permissions issue and allowed me to complete the operation. I used updraft for the plugins, themes, uploads (files) so was just the database restore that was problematic.
Hope that saves someone a headache,
Cheers
- The topic ‘Your database user does not have permission to create tables.’ is closed to new replies.