MySQL program consists of

Source: Internet
Author: User
Tags volatile

    • MySQL的程序组成
1:客户端
mysql:客户端程序
mysqldump:mysql备份工具
mysqladmin:mysql管理工具
mysqlbinlog:二进制日志查询工具

2:服务端
mysqld:服务端程序
mysqld_safe :建议安全运行的服务端程序
mysqld_multi:多实例mysql程序
监听两类套接字地址

3:socket套接字的保存路径
(1):RPM包安装的MySQL
/var/lib/mysql/mysql.sock

(2):二进制或者源码安装的MySQL
/tmp/mysql.sock(不要把它删除了,我就删除过,使得客户端无法连接服务端)



    • 使用格式
[选项] [数据库]
    • 常用选项
-h:指定服务端主机地址
-u: 指定登入的用户名
-p:指明密码
-D:指明登入的数据库
-e:连接之后直接运行SQL语句,不进入交互式模式(可以在脚本中使用)
    • 注意点
SQL语句必须以分号结尾

\G:结尾表示以以竖行显示
    • 数据类型
Data type
char (): Character case-sensitive, non-volatile
Binary (): case-sensitive, non-volatile
varchar (): variable
varbinary (): variable
Text ()
blob ()
Set ()
enum ()
Int ()
float ()
double ()
decimal ()
Date ()
Time ()
datetime ()
timestamp ()

Modifier
unsigned
not null
Default
    • SQL语句
DDL:数据库定义语言
create , alter , drop

DML:数据库操作语言
insert , delete , update , select

DCL:数据库控制语言
grant , revoke

获取帮助
例如:help create

查看所支持的字符集
show character set

查看支持排序规则:
show collation
 

MySQL program consists of

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.