Home  >  Article  >  Database  >  mysql客户端命令行的使用_MySQL

mysql客户端命令行的使用_MySQL

WBOY
WBOYOriginal
2016-06-01 13:06:161077browse

上下键可以重复上面的命令行
show databases;                   显示数据库(不要忘记分号)
create database test;               创建test数据库(默认charset是utf8)
create database test charset-gbk;  创建test数据库charset是gbk
drop database test;               删除test数据库
use test;                                  选择使用test数据库
show tables;                          显示选中数据库中的表
charset GBK或utf8                   改变字符集
                                                    可以直接写SQL语句来创建表
show create table users; 可以查看users表的结构和数据库引擎engine(我的是InnoDB)和字符集charset=utf8;
load data local infile 'D://data//country.txt' into table country(表名) fields terminated by '/t';向表 中插入txt文件中的数据

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn