随笔分类 - Mysql
摘要:MySQL通过set autocommit、start transaction、commit、rollback 等语句支持事务。 默认情况下,MySQL是自动提交的(autocommit)的,如果需要明确的commit和rollback来提交和回滚事务, 那么就需要明确的事务控制命令来开始事务。 在
阅读全文
摘要:innodb_trx ## 当前运行的所有事务innodb_locks ## 当前出现的锁innodb_lock_waits ## 锁等待的对应关系 innodb_trx表列信息: trx_id: 唯一事务id号; TRX_WEIGHT:事务的高度; TRX_STATE: 事务的执行状态,值一般分为
阅读全文
摘要:1.通过--all-databases选项对所有的数据库进行备份 [mysql@redhat6 MysqlDb_Backup]$ mysqldump -uroot -p --single-transaction --master-data --triggers --events --routines
阅读全文
摘要:在mysql提示符下,输入system后面接要执行的操作系统命令,而不用退出mysql命令行,执行操作系统命令。 1.查看当前系统上各文件系统的使用情况: mysql> system df -h;Filesystem Size Used Avail Use% Mounted on/dev/mappe
阅读全文
摘要:在mysql数据库,如果数据库启动的时候,启用了log-bin选项,那么, 所有对于数据库的修改都会记录在binary log中,binary log可以用于数据库的恢复。 1.查看my.cnf中配置的log-bin参数 [mysql@redhat6 ~]$ grep "log-bin" /etc/
阅读全文
摘要:mysql> update user set authentication_string=password('mysql123') where user='root' ;Query OK, 1 row affected, 1 warning (0.00 sec) mysql> flush privi
阅读全文
摘要:Question 1: 你目前接触的mysql版本是什么?除了官方版本,还接触过其他的mysql分支版本嘛? 产生分支的原因 许多开发人员认为有必要将其拆分成其他项目,并且每个分支项目都有自己的专长。该需求以及Oracle对核心产品增长缓慢的担忧,导致出现了许多开发人员感兴趣的子项目和分支 三个流行
阅读全文
摘要:https://blog.csdn.net/loophome/article/details/46549921
阅读全文
摘要:MySQL的max_connections参数用来设置最大连接(用户)数。每个连接MySQL的用户均算作一个连接,max_connections的默认值为100。本文将讲解此参数的详细作用与性能影响。 与max_connections有关的特性 MySQL无论如何都会保留一个用于管理员(SUPER)
阅读全文
摘要:查看binlog过期时间,设置的时间为90天,这个值默认是0天,也就是说不自动清理,可以根据生产情况修改,本例修改为7天 mysql> show variables like 'expire_logs_days' mysql> set global expire_logs_days=7; 设置之后不
阅读全文
摘要:select host from user where user='root';查看允许连接的主机 update user set host = '%' where user ='root'; FLUSH PRIVILEGES; 添加用户 CREATE USER 'prod_zdsb'@'local
阅读全文
摘要:Every InnoDB table has a special index called the clustered index where the data for the rows is stored. Typically, the clustered index is synonymous
阅读全文
摘要:https://blog.csdn.net/weixin_40471676/article/details/119732738
阅读全文
摘要:mysql> show variables like '%innodb_log%' ;+ + +| Variable_name | Value |+ + +| innodb_log_buffer_size | 16777216 || innodb_log_checksums | ON || inno
阅读全文
摘要:mysql 重启之后,innodb_buffer_pool几乎是空的,没有任何的缓存数据。随着sql语句的执行,table中的数据以及index 逐渐被填充到buffer pool里面,之后的查询语句只需要在内存中操作(理想状态下),大幅度提升了mysql的性能。 这个逐渐填充的过程可能需要1-2个
阅读全文
摘要:MySQL数据库服务器通常指的的是mysqld,而命令行mysql则是mysql客户端程序,这两个概念通常容易混淆。通常启动mysql服务器即是启动mysqld进程,mysqld启动后,可以通过mysql连接到mysql服务器。本文主要描述了mysql服务器的几种启动方式以及如何关闭mysql服务器
阅读全文
摘要:mysqldump -uroot -p --databases data_exchange edc35_cloud edc35_cloud_desktop edc35_cloud_store edc35_local_openapi ercse superdiamond user_center --s
阅读全文
摘要:1、在mysql中数据库information_schema中查询以下三张表: select * from innodb_trx; ## 当前运行的所有事务 select * from innodb_locks; ## 当前出现的锁 select * from innodb_lock_waits;
阅读全文
摘要:https://www.cnblogs.com/f-ck-need-u/p/9010872.html
阅读全文
摘要:检查的Mysql是否支持partition (root@localhost)[(none)]SHOW PLUGINS;+ + + + + +| Name | Status | Type | Library | License |+ + + + + +| binlog | ACTIVE | STORA
阅读全文