差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
public:it:mysql [2018/04/18 10:57] – oakfire | public:it:mysql [2023/08/11 11:34] (当前版本) – [Tools] oakfire | ||
---|---|---|---|
行 2: | 行 2: | ||
====== MySQL ====== | ====== MySQL ====== | ||
- | <WRAP center round important 60%> | ||
- | Mysql 的 dns 反查(ip反查)有可能让速度变得很慢,特别是在局域网dns配置失效情况下。 | ||
- | </ | ||
* Official site: [[http:// | * Official site: [[http:// | ||
===== MariaDB ===== | ===== MariaDB ===== | ||
* Official site: [[https:// | * Official site: [[https:// | ||
+ | * 与 mysql 的差异: https:// | ||
+ | * 在root下刚安装完时,即可直接用 '' | ||
+ | * 执行 '' | ||
+ | * Ubuntu20.04 后 MariaDB 默认使用 '' | ||
+ | sudo su # get root access | ||
+ | mysql # connect db | ||
+ | update mysql.user set plugin = ' | ||
+ | flush privileges; | ||
+ | </ | ||
===== Tools ===== | ===== Tools ===== | ||
* Mac 下好用的工具:[[https:// | * Mac 下好用的工具:[[https:// | ||
+ | * [[https:// | ||
===== Manual ===== | ===== Manual ===== | ||
- | * [[http:// | + | * [[https:// |
==== Connect ==== | ==== Connect ==== | ||
* '' | * '' | ||
行 23: | 行 30: | ||
mysql> flush privileges;</ | mysql> flush privileges;</ | ||
==== Database ==== | ==== Database ==== | ||
- | * Create: '' | + | * Create: '' |
- | * List databases: '' | + | * List databases: '' |
- | * Use databases: '' | + | * Use databases: '' |
- | * List tables: '' | + | * List tables: '' |
- | * show table : '' | + | * show table : '' |
* change table: '' | * change table: '' | ||
* change table name: '' | * change table name: '' | ||
行 45: | 行 52: | ||
==== Check Connections ==== | ==== Check Connections ==== | ||
- | * Connection history: '' | + | * Connection history: '' |
- | * Current connections: | + | * Current connections: |
- | * Threads connected: '' | + | * Threads connected: '' |
==== Query ==== | ==== Query ==== | ||
* [[http:// | * [[http:// | ||
行 82: | 行 89: | ||
</ | </ | ||
* 导入导出数据: | * 导入导出数据: | ||
+ | * '' | ||
+ | * '' | ||
* 获取时区设置 '' | * 获取时区设置 '' | ||
* Timestamp 类型赋值给 Datetime 类型< | * Timestamp 类型赋值给 Datetime 类型< | ||
行 88: | 行 97: | ||
</ | </ | ||
* [[http:// | * [[http:// | ||
+ | * 关闭mysql主从,关闭binlog; | ||
+ | * 开启mysql主从,设置expire_logs_days; | ||
+ | * 手动清除binlog文件,'' | ||
+ | * DNS解析如果有问题的话会影响 mysql 连接速度,可在 '' | ||