Expected IF NOT EXISTS or valid table name but "'" found

I’m trying to import a MySQL dump but run up against the error
Expected IF NOT EXISTS or valid table name but " ’ " found.
on the first create table line. Can someone explain why this is not working? The dump is regularly used to recreate the database structure in other environments and only generates this error in dbdiagram.io
Thanks.

CREATE TABLE ‘address’ (
‘a_id’ int(11) unsigned NOT NULL AUTO_INCREMENT,
‘a_line1’ varchar(75) COLLATE utf8_unicode_ci DEFAULT NULL,
‘a_line2’ varchar(75) COLLATE utf8_unicode_ci DEFAULT NULL,
‘a_city’ varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL,
‘a_acid’ int(11) unsigned DEFAULT NULL,
‘a_postcode’ varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL
)

2 Likes

I know this is old, but I just had the same, very frustrating issue and resolved by surrounding any text delimited field (address, a_id etc) with a back tick `, not a single quote. Figured out by exporting the demo diagram to mySQL and opening that.

[quote=“LeeJS, post:1, topic:678”]
CREATE TABLE address (
a_id int(11) unsigned NOT NULL AUTO_INCREMENT,
… [/quote]

(I tried to add the back tick above but converted to a different format in this reply.)