windows 下mysql sql 文件的恢复
是 mysql -uroot -p
user mysql
source F:/dba.sql;linux 可以用一个命令代替 mysql -uroot -p111 om < my.sql现在我的db 在windows 必须使用一个命令来完成所有 (因为sql 文件是在太多 ,有30多个)。
在windows下如何用一个命令来完成上面的功能 ??
是 mysql -uroot -p
user mysql
source F:/dba.sql;linux 可以用一个命令代替 mysql -uroot -p111 om < my.sql现在我的db 在windows 必须使用一个命令来完成所有 (因为sql 文件是在太多 ,有30多个)。
在windows下如何用一个命令来完成上面的功能 ??
解决方案 »
- mysql在触发器中使用游标更新的问题?
- 求解决Mysql建表时间默认值问题!
- 一个写着存储过程的sql文件 导入出错
- mysql通过花生壳外网访问的问题
- 如何利用mysql select产生新表?
- mysql权限问题
- “my.ini”文件在哪里啊,我怎么找了半天也没有找到啊~~~哪位大哥说一下,我就这点分了。
- Mysql分组查询取每组前N条数据
- mysql8.0解析json时如和把json数组的某个字段的值相加求和
- 求助,mysql启动报/usr/local/mysql/bin/mysqld_safe: line 183: 2664 Killed
- 请教 两个数据库内的表是不是不能重名?
- 4千万数据的表,删除重复数据
mysql Ver 14.12 Distrib 5.0.37, for Win32 (ia32)
Copyright (C) 2002 MySQL AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Usage: mysql [OPTIONS] [database]
-?, --help Display this help and exit.
-I, --help Synonym for -?
--auto-rehash Enable automatic rehashing. One doesn't need to use
'rehash' to get table and field completion, but startup
and reconnecting may take a longer time. Disable with
--disable-auto-rehash.
-A, --no-auto-rehash
No automatic rehashing. One has to use 'rehash' to get
table and field completion. This gives a quicker start of
mysql and disables rehashing on reconnect. WARNING:
options deprecated; use --disable-auto-rehash instead.
-B, --batch Don't use history file. Disable interactive behavior.
(Enables --silent)
--character-sets-dir=name
Directory where character sets are.
--default-character-set=name
Set the default character set.
-C, --compress Use compression in server/client protocol.
-#, --debug[=#] This is a non-debug version. Catch this and exit
-D, --database=name Database to use.
--delimiter=name Delimiter to be used.
-e, --execute=name Execute command and quit. (Disables --force and history
file)
-E, --vertical Print the output of a query (rows) vertically.
-f, --force Continue even if we get an sql error.
-G, --named-commands
Enable named commands. Named commands mean this program's
internal commands; see mysql> help . When enabled, the
named commands can be used from any line of the query,
otherwise only from the first line, before an enter.
Disable with --disable-named-commands. This option is
disabled by default.
不知道如何解决??/
mysql -uroot -pbest mydb <c:\test2\Entity.sql 后面不能加 ; -----这样是成功的恶但是现在linux下这30个sql 之间可以用; 号来隔离。在windows下不能使用这个;号。
那么我的.bat文件该如何才能让这30个sql在windows依次执行(问题关键:mysql -uroot -pbest mydb <c:\test2\Entity.sql 后面不能加 ;
我需要执行30个这样的命令 如何才能让这些命令依次进行
)
mysql -uroot -pbest mydb <c:\test2\Entity2.sql
mysql -uroot -pbest mydb <c:\test2\Entity3.sql
mysql -uroot -pbest mydb <c:\test2\Entity4.sql
自动换行 自动识别