Reputation: 11
Basically what it sounds like the database is named default
which was already there when i made the connection and the tables that are in it are inaccesible.
I've tried moving the tables to another database but mysql doesnt recognize that when i type default i mean the database and not the data type in mysql.
Any help? I goofed somehow and dont know how to fix it and havent found anything else like this problem online.
Upvotes: 1
Views: 29
Reputation: 562280
You can use any SQL reserved keyword as an identifier, but you must enclose them in back-ticks:
SELECT ... FROM `default`.admin ...
It's simpler if you move the tables to another schema that has a name that doesn't conflict with a reserved keyword.
Unfortunately, there's no RENAME SCHEMA statement in MySQL. You have to create a new schema and then RENAME TABLE to move them one by one.
CREATE SCHEMA my_awesome_schema;
RENAME TABLE `default`.admin TO my_awesome_schema.admin;
...same for other tables...
Upvotes: 2