Unable to create a table in phpMyAdmin under a user that has all sufficient permissions: #1142 - CREATE command denied to user 'username'@'localhost' for table

Created:

2017-06-22 16:25:25 UTC

Modified:

2017-08-08 13:18:10 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to create a table in phpMyAdmin under a user that has all sufficient permissions: #1142 - CREATE command denied to user 'username'@'localhost' for table

Symptoms

Unable to create a table named "tablename.example" in phpMyAdmin under a user that has all sufficient permissions:

mySQL said:
#1142 - CREATE command denied to user 'username'@'localhost' for table 'example'

The following query was used that was obtained from Workbench:

create table if not exists `tablename`.`example` (
`entryid` int not null,
`serverid` longtext null default null,
`userid` longtext null default null,
primary key (`entryid`))

Cause

Incorrect syntax for the query: `tablename.example` should be used instead of `tablename`.`example`

Resolution

To create a table named "tablename.example" in phpMyAdmin, use the following query:

create table if not exists `tablename.example` (
`entryid` int not null,
`serverid` longtext null default null,
`userid` longtext null default null,
primary key (`entryid`))




Attachments:

Have more questions? Submit a request
Please sign in to leave a comment.