本人菜鸟,初学MYSQL,请问在命令提示符(cmd)下如何将我已经写好的建库和建表语句导入到Mysql数据库中。
例如:
create database test;
use test;
create table login_set(
id int(4) auto_increment not null primary key,
Log_open int(3) not null,
Start_money float(8),
is_autocheck int(3),
by1 varchar(1000),
by2 varchar(1000)
);create table estop_list(
id int(4) auto_increment not null primary key,
estop_type varchar(50),
estop_value varchar(100)
);这些内容是我写在testsql.txt中的内容,在D盘的跟目录下。
现在我想通过cmd的命令提示符将改内容导入到mysql数据库中运行。请问命令我应该怎么打?在线等,谢谢各位。
如果大家不明白我的意思,我随时将问题补充。诚心求解!
例如:
create database test;
use test;
create table login_set(
id int(4) auto_increment not null primary key,
Log_open int(3) not null,
Start_money float(8),
is_autocheck int(3),
by1 varchar(1000),
by2 varchar(1000)
);create table estop_list(
id int(4) auto_increment not null primary key,
estop_type varchar(50),
estop_value varchar(100)
);这些内容是我写在testsql.txt中的内容,在D盘的跟目录下。
现在我想通过cmd的命令提示符将改内容导入到mysql数据库中运行。请问命令我应该怎么打?在线等,谢谢各位。
如果大家不明白我的意思,我随时将问题补充。诚心求解!
解决方案 »
- mysql的突然变成本地不能用密码,远程要用密码才能登录,这是神马情况???求解
- 搭建mysql多主多从服务器
- 请教一条查询语句
- 现在需统计近1,2,7,30 天 当前月,上个月 bandwinds数? 请高手指教!!!
- linux下mysql 一主2从复制配置失败
- Postgresql是否像oracl那样,支持 一个表分成几个区?
- 请教一下大家
- 安装问题
- 有一个问题,假设Mysql 中一个表有20条记录,id是其中一个自增长的字段,由于id从1开始自增,所以现在id=20,但当删除一条记录之后,id不再连续
- MYSQL修改密码重新启动后还原原来状态!!
- 为什么我用临时表会报Can't reopen table: 'tmp_query_full_item_inv'
- mysql中查询结果集中记录的条数时,出现段错误!
mysql -uroot -p**** < testsql.txt