mysql OCP考题知识点

1、mysqldump参考网址

#常用命令

https://www.centos.bz/2018/02/mysqldump-%E5%8F%82%E6%95%B0%E5%92%8C%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95%E4%BB%8B%E7%BB%8D/

##参数详解

https://segmentfault.com/a/1190000000621104

##--single-transcation和--master-data过程

https://www.itdaan.com/blog/2015/11/13/4584275d7f65f966b60fce3cc97fa25f.html

 

 

 

2、全局内存和线程及内存分配(ocp中第6题描述的清)

per_thread_buffers=(read_buffer_size+read_rnd_buffer_size+sort_buffer_size+thread_stack+joi

n_buffer_size+binlog_cache_size+tmp_table_size)*max_connections

 

global_buffers=innodb_buffer_pool_size+innodb_additional_mem_pool_size+innodb_log_buffer _size+key_buffer_size+query_cache_size

 

 

3、auto-increment 的 AUTO-INC 锁

https://keithlan.github.io/2017/03/03/auto_increment_lock/

 

https://dev.mysql.com/doc/refman/5.7/en/innodb-auto-increment-handling.html

 

结论:如果你的binlog-format是row模式,而且不关心一条bulk-insert的auto值连续(一般不用关心),那么设置innodb_autoinc_lock_mode = 2 可以提高更好的写入性能。

 

4、mysqlbackup备份恢复(付费产品了解即可)

http://blog.itpub.net/12679300/viewspace-2145129/

 

https://dbaplus.cn/news-11-1267-1.html

 

 

5、mysql_config_editor

mysql_config_editor 出现在 mysql5.6.6 以后的版本,可以给指定的连接和密码生成一个加密文件.mylogin.cnf,默认位于当前用户家目录下。通过该文件可以使用 mysql、mysqladmin 等直接登录,避免明文密码出现在脚本中。

 

帮助:mysql_config_editor set --help

配置项:

-h,–host=name 添加host到登陆文件中

-G,–login-path=name 在登录文件中为login path添加名字(默认为client)

-p,–password 在登陆文件中添加密码(该密码会被mysql_config_editor自动加密)

-u,–user 添加用户名到登陆文件中

-S,–socket=name 添加sock文件路径到登陆文件中

-P,–port=name 添加登陆端口到登陆文件中

 

 

 

语法:

mysql_config_editor set [command options] Sets user name/password/host name/socket/port for a given login path (section).
mysql_config_editor remove [command options] Remove a login path from the login file.
mysql_config_editor print [command options] Print all the options for a specified login path.
mysql_config_editor reset [command options] Deletes the contents of the login file.

 

命令实例:

##设置登录凭据(默认--login-path为client

mysql_config_editor set -G mypath -u root -p -S /u01/data/mysql5.7.25/mysql.sock
mysql_config_editor set -G user1 -u user1 -p -S /u01/data/mysql5.7.25/mysql.sock

mysql_config_editor set --login-path=test --user=test_user  --host=127.0.0.1 --port=3306 --password

 

##查看配置:

mysql_config_editor print --login-path=test #显示执行的login-path配置

mysql_config_editor print --all             #显示所有的login-path信息

 

##删除 login path
mysql_config_editor remove -G user1

mysql_config_editor remove --login-path=test

 

 

#清空所有或者某个
mysql_config_editor reset

mysql_config_editor reset --login-path=test

 

#使用login-path登录:

mysql --login-path=test

mysql --login-path=test  -h host1 -P port1 #登录host1:port1上的MySQL

mysql --login-path=test  -h host1 -P port1 test_db #登录host1:poet1上的MySQL中的test_db库

mysqladmin --login-path=mypath status

 

 

6、FLUSH TABLES ... FOR EXPORT 拷贝innodb表

https://keithlan.github.io/2016/04/21/transportable/

 

 

 

 

7、当授予 create routine 时,自动授予 EXECUTE, ALTER ROUTINE 权限给它的创建者。可以使用{alter |drop} {procedure|function}

 

 

8、mysql用户管理、x509、SSl、Expire、resource、auth plugin

https://zhuanlan.zhihu.com/p/55798418

 

https://dev.mysql.com/doc/refman/5.7/en/create-user.html#create-user-tls

 

9、InnoDB Adaptive hash index

https://blog.csdn.net/bohu83/article/details/82107598

 

https://www.modb.pro/db/25144

 

10、锁简介

http://09itblog.site/?p=685

 

https://blog.csdn.net/bohu83/article/details/82833171

 

11、explain简介

https://www.cnblogs.com/xuanzhi201111/p/4175635.html

 

https://mengkang.net/1124.html

 

 

12、ALTER IGNORE TABLE、 old_alter_table

http://mysql.taobao.org/monthly/2015/06/03/

 

 

13、mysql复制延迟

https://blog.51cto.com/roidba/1893340

 

 

14、validate_password_policy 密码校验策略

https://cloud.tencent.com/developer/article/1368306

 

https://blog.csdn.net/wltsysterm/article/details/79649484

 

 

 

15、忘记root密码

https://www.cnblogs.com/ivictor/p/9243259.html

 

 

16、binlog-do-db  binlog-ignore-db   binary log知识点

https://dev.mysql.com/doc/refman/5.7/en/replication-options-binary-log.html

 

https://www.cnblogs.com/xinysu/p/6607658.html

 

 

17、Forcing InnoDB Recovery  

https://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html

 

 

18、mysql发送明文密码 clear text

https://dev.mysql.com/doc/refman/5.7/en/cleartext-pluggable-authentication.html

 

 

19、Proxy Users mysql代理用户

https://dev.mysql.com/doc/refman/5.7/en/proxy-users.html

 

 

 

20、max_allowed_packed 

https://dev.mysql.com/doc/refman/5.7/en/packet-too-large.html

 

21、CREATE TABLE AS SELECT statement 严禁使用

https://www.percona.com/blog/2018/01/10/why-avoid-create-table-as-select-statement/

 

 

22、MySQL 的PAM Pluggable Authentication

https://dev.mysql.com/doc/mysql-security-excerpt/8.0/en/pam-pluggable-authentication.html

 

 

###其它

mysql半同步安装配置

http://m.aluaa.com/articles/2019/07/16/1563273440479.html

 

##pt-query-digest是用于分析mysql慢查询

https://www.cnblogs.com/luyucheng/p/6265873.html

 

##LOAD DATA INFILE、mysqlimport

https://www.runoob.com/mysql/mysql-database-import.html

 

 

##MySQL 使用 SSL 连接

https://segmentfault.com/a/1190000007819751

 

 

##mysql不错的面试提问题目

https://zhuanlan.zhihu.com/p/142131862

 

 

##增加从库并发线程数

https://blog.csdn.net/GGGoodLuck/article/details/78891066

 

 

##数字签名是什么

https://www.ruanyifeng.com/blog/2011/08/what_is_a_digital_signature.html

 

 

##全表扫描和全索引扫描

https://www.percona.com/blog/2012/11/23/full-table-scan-vs-full-index-scan-performance/

 

 

 

##MySQL中完全禁用查询缓存

https://www.percona.com/blog/2016/11/11/is-your-query-cache-really-disabled/

 

 

##query cache lock

https://www.cnblogs.com/billyxp/archive/2013/04/03/2997983.html

 

 

##修复MySQL slave中继日志损坏

https://zhuanlan.zhihu.com/p/78913854

 

 

##sync_relay_log对io的影响

https://www.sohu.com/a/238462481_610509

 

 

 

##MySQL备份锁

https://www.cnblogs.com/cchust/p/5560073.html

 

 

##read_buffer_size调优

https://www.percona.com/blog/2007/09/17/mysql-what-read_buffer_size-value-is-optimal/

 

 

##linux磁盘异常占用

https://blog.51cto.com/zhaopeiyan/1970900

 

 

##innodb_lock_wait_timeout参数修改

http://blog.itpub.net/24113018/viewspace-1984166/

 

##mysql视图

https://www.cnblogs.com/geaozhang/p/6792369.html

 

©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页