Hi i had the following table structure on mysql workbench for a table example_1
But because of some reasons i want to recreate all the tables in phpmyadmin
with the create table sysntax
like below
Create table code in MYSQL workbench :
CREATE TABLE `example_1` (
`job_id` int(11) NOT NULL AUTO_INCREMENT,
`source_id` int(11) DEFAULT NULL,
`publication_id` int(11) DEFAULT NULL,
`facility_id` int(11) DEFAULT NULL,
`job_type_id` int(11) NOT NULL,
`template_id` int(11) DEFAULT NULL,
`account_num` varchar(9) DEFAULT NULL,
`start_dt` datetime DEFAULT NULL,
`end_dt` datetime DEFAULT NULL,
`pdf_path` varchar(20) DEFAULT NULL,
`admin_user_id` int(11) NOT NULL,
`skills` varchar(255) DEFAULT NULL,
`tracking_pixel` varchar(255) DEFAULT NULL,
`auto_renew` smallint(6) DEFAULT NULL,
PRIMARY KEY (`job_id`),
KEY `source_id_idxfk` (`source_id`),
KEY `facility_id_idxfk` (`facility_id`),
KEY `job_type_id_idxfk` (`job_type_id`),
KEY `template_id_idxfk` (`template_id`),
CONSTRAINT `jp_job_ibfk_1` FOREIGN KEY (`source_id`) REFERENCES `jp_source` (`source_id`),
CONSTRAINT `jp_job_ibfk_2` FOREIGN KEY (`facility_id`) REFERENCES `adm_facility` (`facility_id`),
CONSTRAINT `jp_job_ibfk_3` FOREIGN KEY (`job_type_id`) REFERENCES `jp_job_type` (`job_type_id`),
CONSTRAINT `jp_job_ibfk_4` FOREIGN KEY (`template_id`) REFERENCES `jp_template` (`template_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8
I had copied and pasted the same in phpmyadmin
to create the same table, then i got the following error
Error :
InnoDB
Supports transactions, row-level locking, and foreign keys
[ Variables | Buffer Pool | InnoDB Status ]
Can anyone please let me know how to edit the code in order to avoid errors and create a table in phpmyadmin sql editor
It seems that INNODB
Engine is disabled on your server. Just remove any disable options for innodb in /etc/my.cnf
and restart mysql
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.