mySQl中出现问题了,打不开数据库,, 20
问题:YouhaveanerrorinyourSQLsyntax;checkthemanualthatcorrespondstoyourMySQLserverversio...
问题:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';CREATE TABLE IF NOT EXISTS `lib`.`admin` ( `id` INT NOT NULL , `user` VARCHA' at line 1 (1064) - ;
Unknown database 'lib' (1049) - CREATE TABLE IF NOT EXISTS `lib`.`admin` ( `id` INT NOT NULL , `user` VARCHAR(45) NOT NULL , `passwd` VARCHAR(45) NULL , PRIMARY KEY (`id`) );
代码:
;CREATE TABLE IF NOT EXISTS `lib`.`admin` ( `id` INT NOT NULL , `user` VARCHAR(45) NOT NULL , `passwd` VARCHAR(45) NULL , PRIMARY KEY (`id`) );
;CREATE TABLE IF NOT EXISTS `lib`.`books` ( `id` INT NOT NULL , `title` VARCHAR(45) NOT NULL , `author` VARCHAR(45) NOT NULL , `state` BIT NULL DEFAULT 1 , PRIMARY KEY (`id`) );
急求啊....... 展开
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';CREATE TABLE IF NOT EXISTS `lib`.`admin` ( `id` INT NOT NULL , `user` VARCHA' at line 1 (1064) - ;
Unknown database 'lib' (1049) - CREATE TABLE IF NOT EXISTS `lib`.`admin` ( `id` INT NOT NULL , `user` VARCHAR(45) NOT NULL , `passwd` VARCHAR(45) NULL , PRIMARY KEY (`id`) );
代码:
;CREATE TABLE IF NOT EXISTS `lib`.`admin` ( `id` INT NOT NULL , `user` VARCHAR(45) NOT NULL , `passwd` VARCHAR(45) NULL , PRIMARY KEY (`id`) );
;CREATE TABLE IF NOT EXISTS `lib`.`books` ( `id` INT NOT NULL , `title` VARCHAR(45) NOT NULL , `author` VARCHAR(45) NOT NULL , `state` BIT NULL DEFAULT 1 , PRIMARY KEY (`id`) );
急求啊....... 展开
2个回答
展开全部
没有lib这个库,设置innodb_force_recovery=2启动试试,如果起不来,就加大此值,直到可以起来(最大值为6,一般4就可以),然后将数据导出,删除数据库中数据以及各种log,重启然后导入!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询