mysql
mysql is a simple sql shell, which can be used to manage mysql database.
Scope of this command: RedHat, RHEL, Ubuntu, CentOS, Fedora.
1 , grammar
mysql [options] db
2 , the parameter list
Options |
Explanation |
-? | --help |
Displays help information |
--auto-rehash |
Activate the automatic function rehash |
--bind-address=ip |
Binding ip, when the computer has multiple network cards, you can specify the card when mysql connection |
--character-sets-dir = path |
Specifies the directory where the character set |
--column-names |
Display column names in results |
-C | --comments |
Display comments being transmitted to the server |
-c | --compress |
Data between the server and the client is compressed |
-D db | --database=db |
Specify the database name |
--default-character-set=chatset |
The default character set |
-e statement | --execute=statement |
Specifies the command you want to use |
-f | --force |
Enforcement |
-H | --html |
Output html format |
-i | --ignore-spaces |
Ignore spaces |
--line-numbers |
Display line numbers for the error message |
--local-infile=0|1 |
关闭或者开启LOAD DATA INFILE功能 |
-A | --no-autp-rehash |
关闭自动rehash功能 |
-b | --no-beep |
关闭出错提醒 |
-p password | --password= |
连接数据库使用的密码 |
-W | --pipe |
使用有名管道连接数据库 |
-P port | --port= |
连接数据库使用的端口 |
--protocol=TCP|SOCKET|PIPI|MEMORY |
连接数据库使用的协议 |
-q | --quick |
不缓存查询结果 |
-s | --silent |
输出简短的内容 |
-v | --verbose |
显示详细执行过程 |
-V | --version |
显示版本信息 |
-w | --wait |
等待时间 |
-X | --xml |
产生xml输出 |
-u user | --user= |
连接数据库的用户名,默认是rootq |
3、实例
1)登录
|
2)查看权限
|
做了一个Linux学习的平台,目前出来一个雏形,各位可以参考使用
链接:https://pan.baidu.com/s/1GOLVU2CbpBNGtunztVpaCQ 密码:n7bk