你在提示符下输入?看一看有什么东西!!其中有一栏是说明如何执行script的我已经把它标记出来。mysql>?help (\h) Display this help.
? (\?) Synonym for `help'.
clear (\c) Clear command.
connect (\r) Reconnect to the server. Optional arguments are db and host.
ego (\G) Send command to mysql server, display result vertically.
exit (\q) Exit mysql. Same as quit.
go (\g) Send command to mysql server.
notee (\t) Don't write into outfile.
print (\p) Print current command.
prompt (\R) Change your mysql prompt.
quit (\q) Quit mysql.
rehash (\#) Rebuild completion hash.
=============================================================================
source (\.) Execute a SQL script file. Takes a file name as an argument.
=============================================================================
status (\s) Get status information from the server.
tee (\T) Set outfile [to_outfile]. Append everything into given outfile.
use (\u) Use another database. Takes database name as argument.
mysql> \. 路径/文件名字
在文件名不一定是以.sql结尾的。
? (\?) Synonym for `help'.
clear (\c) Clear command.
connect (\r) Reconnect to the server. Optional arguments are db and host.
ego (\G) Send command to mysql server, display result vertically.
exit (\q) Exit mysql. Same as quit.
go (\g) Send command to mysql server.
notee (\t) Don't write into outfile.
print (\p) Print current command.
prompt (\R) Change your mysql prompt.
quit (\q) Quit mysql.
rehash (\#) Rebuild completion hash.
=============================================================================
source (\.) Execute a SQL script file. Takes a file name as an argument.
=============================================================================
status (\s) Get status information from the server.
tee (\T) Set outfile [to_outfile]. Append everything into given outfile.
use (\u) Use another database. Takes database name as argument.
mysql> \. 路径/文件名字
在文件名不一定是以.sql结尾的。
解决方案 »
- 主表和明细表有级联删除时,明细表的触发器没有触发??
- mysql是否支持prepareStatement
- 数据库设计一问--探讨如何操作最高效
- 奇怪了,这个mysql的存储过程到底哪里有错呢
- 我正在学习的开源系统:Linux/Apache/Mysql/Ruby/Eclipse
- 求救~!请教各位大吓帮忙!!---续
- 求一个sql语句的写法....急急急
- 在不停止MYSQL的运行,复制一个表名name_info到name_info_back,结构一致,请帮忙!
- 查询不存在表中的
- 如何计算mysql数据库表中单条记录所占据的磁盘容量大小?或者找出单条记录中占据磁盘容量的最大值
- 在linux下,安装mysql得二进制文件mysql-3.23.55-pc-linux-i686.tar.gz的命令是什么?
- MySQL数据库使用何种JDBC DRIVER比较好?
mysql db_name <xxx.sql
1:
mysql> source c:/123.sql
2:mysql -h locoalhost -u root databasename < c:/123.sql