Home > Database > Mysql Tutorial > msyql的一些基本操作_MySQL

msyql的一些基本操作_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:35:28
Original
919 people have browsed it

bitsCN.com

mysql –uroot –p//mysql ——user root ——password 密码(尽量不写)

服务端/客户端,在进程服务中启动、关闭服务,net start 服务名

指定字符集

 

几本操作语句:

1.show database/tables;

2.use database;                show database;

3.Esc或者/c清楚操作命令

4.desc 表;        ……………………………………    //显示表结构

5.grant all on 数据库.* to “username”@"localhost” identified by “密码";            …………//somebody onle can use this database;

6.create database;

7.create talbe 名字(id into(10) primary key auto_increment,name varchar(3),age tinyint(2));

8.inser into 表明(name ,age) values(“zhangsan”,22);

9.mysqldump -u用户名 -p密码 -h主机 数据库 a -w "sql条件" --lock-all-tables > 路径   …………//外部备份

   mysqldump -u用户名 -p密码 -h主机 数据库

   source     路径                                                                                               ……………//内部导入

bitsCN.com
Related labels:
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template