CREATE DATABASE lvyunlei
ON PRIMARY
(
NAME = Crosssqlone,
FILENAME = 'c:/temp/CrossGQL_dat.mdf',
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH= 5
)
LOG ON
(
NAME = CrossSQL_log1,
FILENAME = 'c:/temp/CrossGQL_log1.ldf',
SIZE = 5,
MAXSIZE = 25,
FILEGROWTH = 5
)
错误代码: 1064
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 'ON PRIMARY
(
NAME = Crosssqlone,
FILENAME = 'c:/temp/CrossGQL_dat.mdf',
SIZE' at line 2
------解决方案--------------------
MYSQL 不是MSSQL的语法了
CREATE {DATABASE
------解决方案--------------------
SCHEMA} [IF NOT EXISTS] db_name
[create_specification [, create_specification] ...]
create_specification:
[DEFAULT] CHARACTER SET charset_name
------解决方案--------------------
[DEFAULT] COLLATE collation_name
------解决方案--------------------
貌似没有,就一个日志和一个数据文件。在INNODB的话。
------解决方案--------------------
目测没有语法错误,除非你不是在sql中运行的
------解决方案--------------------
你到底想用mysql还是sqlserver?
------解决方案--------------------
CREATE DATABASE lvyunlei
ON -- PRIMARY 这儿不要这个,你把primary去掉就可以了
(
NAME = Crosssqlone,
FILENAME = 'c:/temp/CrossGQL_dat.mdf',
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH= 5
)
LOG ON
(
NAME = CrossSQL_log1,
FILENAME = 'c:/temp/CrossGQL_log1.ldf',
SIZE = 5,
MAXSIZE = 25,
FILEGROWTH = 5
)