MySQL 5.7 MySQL command line client 使用命令
来源:互联网 发布:可以打电话的软件 编辑:程序博客网 时间:2024/05/19 14:34
mysql command line client 使用命令 (每条命令结束必须要有结束符 可以是分号)
1.输入密码,连接数据库:
******
2.修改root密码:
set password for 'root'@'localhost'=password('123456');
3.显示数据库
show databases;
4.对数据库操作之前要输入如下命令
use databasename;
5.显示数据库中的表
show tables;
6.对表进行操作
describe user;
数据表user的操作
插入insert into user values("user","123456");
删除
delete from user where username="user";
修改
update user set username="adm" where username="user";
查询数据
7.导入.sql文件命令(例如D:/mysql.sql)
source d:/mysql.sql;
8.删除表
drop TABLE tablename;
9.清空表
10、显示当前数据库服务器中的数据库列表:
11、显示数据库中的数据表:
show table;
12、显示数据表的结构:
describe table;
13、建立数据库:
create database;
14、建立数据表:
create table (id int(2), name varchar(20));
15. 向表中添加列:
ALTER TABLE table_name
ADD column_name datatype;
15、删除数据库:
drop database;
16、删除数据表:
drop table ;
17、将表中记录清空:
delete from table ;
18、用文本方式将数据装入数据表中:
load data local infile “D:/mysql.txt” into tablename;
19、导入.sql文件命令:
source d:/mysql.sql;
20、显示use的数据库名:
select database();
21、显示当前的user:
select user();
- MySQL 5.7 MySQL command line client 使用命令
- mysql command line client 使用命令
- mysql command line client 使用命令
- mysql command line client 使用命令
- mysql command line client 使用命令
- mysql command line client 使用命令
- mysql command line client 使用命令
- MySQL Command Line Client
- MySQL Command Line Client
- MySQL 5.7 command line client指令总结
- mysql command line client语法
- MySql command line client命令系列简析
- 在MySQL command line client 中使用 mysqldump问题
- MySql Command Line Client 出现乱码
- MySQL Command Line Client一闪而过的问题
- mysql command line client的中文问题
- Mysql command Line Client 导入sql文件
- mysql command line client输入密码一闪而过
- 提高sql查询效率速成宝典
- ListView入门(一)
- Android hellochart使用(可以在Eclipse中运行)
- devtools was disconnectedfrom the page
- Android布局——常用控件研究
- MySQL 5.7 MySQL command line client 使用命令
- 数字图像处理实训报告
- Valgrind快速入门指南
- postgre的数组使用
- 卷积神经网络传播过程中感受野的理解以及feature map size 、receptive field size的计算(代码)
- AndroidStudio 线程
- django-rest-swagger的优化使用
- Android面试总结
- 文本文件(ASCII)的读写