digdeep

凡是过去,皆是序幕。Read the fucking manual and source code.

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

随笔分类 -  MySQL

上一页 1 2 3 下一页

摘要:https://github.com/innotop/innotop 1. 安装centos 7 yum install innotop 2. 使用: 进入DashBoard界面: 帮组文档:输入 ? 输入大写字母可以切换到不同的 模式,可以监控mysql不同的指标,输入B: 如果要返回到 Dash 阅读全文
posted @ 2020-03-10 16:07 digdeep 阅读(550) 评论(0) 推荐(0)

摘要:mysql 的一个从库报错: Could not execute Write_rows event on table xxx.xxxx_tmp_tj; Error writing file '/tmp/MLLGyECY' (Errcode: 28 - No space left on device) 阅读全文
posted @ 2020-03-03 18:27 digdeep 阅读(3518) 评论(0) 推荐(0)

摘要:1. secure_file_priv mysql 数据导出和导入csv格式时,需要特别注意 null 和空字符的处理,在导出和导入的结果要保持一致。 secure_file_priv 在 select into file 时指定文件存储位置。 如果为null表示不能使用 select into o 阅读全文
posted @ 2020-02-26 21:40 digdeep 阅读(4613) 评论(0) 推荐(1)

摘要:https://www.percona.com/doc/percona-xtrabackup/2.4/installation/yum_repo.html 1. yum 安装方式 yum install https://repo.percona.com/yum/percona-release-lat 阅读全文
posted @ 2020-02-18 15:50 digdeep 阅读(220) 评论(0) 推荐(0)

摘要:如题,bug重现如下: CREATE TABLE a ( col VARCHAR(7)) INSERT INTO a (col) VALUES ('5,'); CREATE TABLE b (col VARCHAR(7)); 这里 col = '5,' 遇到了 case when col=5 时,发 阅读全文
posted @ 2020-01-09 22:27 digdeep 阅读(230) 评论(0) 推荐(0)

摘要:向表中插入指定日期范围的连续日期。 调用方式: call insertManyDate(STR_TO_DATE('2019-06-12','%Y-%m-%d'),STR_TO_DATE('2019-12-19','%Y-%m-%d')) 阅读全文
posted @ 2019-12-18 21:35 digdeep 阅读(2252) 评论(0) 推荐(0)

摘要:应用突然被hang住了,tomcat日志报错,所有涉及到数据库的操作都报错,卡死。 show processlist 查看到大量的:Waiting for table flush 应该是 进行了 ddl 或者 flush tables 了, 想到是被 mysqldump 进行flush tables 阅读全文
posted @ 2019-12-09 14:50 digdeep 阅读(1068) 评论(0) 推荐(0)

摘要:将CSV格式数据导入 mysql,报错: load data infile 'f:/nmg.csv' into table nmg fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated 阅读全文
posted @ 2019-12-02 09:55 digdeep 阅读(8098) 评论(0) 推荐(0)

摘要:gdb -p $(pidof mysqld) -ex "set max_connections=1500" -batch 使用 gdb 临时调大 参数 max_connections 。 阅读全文
posted @ 2019-09-04 14:51 digdeep 阅读(684) 评论(0) 推荐(0)

摘要:MySQL关于 lower_case_table_names 的文档 https://dev.mysql.com/doc/refman/5.7/en/identifier-case-sensitivity.html In MySQL, databases correspond to director 阅读全文
posted @ 2019-09-01 11:31 digdeep 阅读(1451) 评论(0) 推荐(0)

摘要:系统首页的ajax调用出现 报错: provisional headers are shown 最后查到的原因时,mysql数据库的磁盘满了,而首页的ajax调用要插入一条记录到数据库,卡住了。 阅读全文
posted @ 2019-08-31 09:29 digdeep 阅读(289) 评论(0) 推荐(0)

摘要:1. 乱码问题 编辑目标数据库的链接: 配置编码参数即可。 2. 报错 No operations allowed after statement closed. 需要调整wait_timeout: set global wait_timeout=1000000; 3. net_write_time 阅读全文
posted @ 2019-06-03 15:37 digdeep 阅读(2926) 评论(0) 推荐(0)

摘要:UPDATE table_a INNER JOIN table_b b ON a.id=b.idSET a.column_x=b.clumn_x WHERE xxx 阅读全文
posted @ 2019-04-28 17:11 digdeep 阅读(356) 评论(0) 推荐(0)

摘要:Tomcat日志报死锁错误,show innodb status获取死锁信息: TRANSACTION 2067C318, ACTIVE 16 sec fetching rowsmysql tables in use 1, locked 1LOCK WAIT 2183 lock struct(s), 阅读全文
posted @ 2018-12-04 21:08 digdeep 阅读(1196) 评论(0) 推荐(0)

摘要:项目因为历史原因使用了 GBK编码,遇到非GBK编码字符时出现乱码问题,情况比较严重,暂时先打算修改 列的字符编码为 utf8mb4. 查看 mysql 手册: 用 GBK 编码转 utf8 进行说明: 他的大概意思是,如果 是 char varchar text 等类型的,并且这些列的内容也是采用 阅读全文
posted @ 2018-01-24 16:15 digdeep 阅读(523) 评论(0) 推荐(0)

摘要:最近参与一个开源项目,一个功能的实现,用到了 druid 解析器来解析SQL,记录下如果使用 druid 来解析SQL,实现对SQL的拦截改写。1. 对 insert 语句进行解析: private static String convertInsertSQL(String sql){ try{ ... 阅读全文
posted @ 2015-12-23 20:40 digdeep 阅读(35457) 评论(0) 推荐(0)

摘要:一个简单的测试:start transaction;insert into tb1 values(3, repeat('a', 65000),'x',1);--commit;rollback;下图分别是 tb1.ibd 在插入前,回滚前,回滚后的文件大小:有人在QQ群问:为什么回滚会导致tb1.id... 阅读全文
posted @ 2015-12-10 17:52 digdeep 阅读(1204) 评论(0) 推荐(0)

摘要:调用 pt-diskstats 时报错如下Can't locate Time/HiRes.pm in @INC[root@localhost ~]# pt-diskstatsCan't locate Time/HiRes.pm in @INC (@INC contains: /usr/local/l... 阅读全文
posted @ 2015-11-27 16:34 digdeep 阅读(722) 评论(0) 推荐(0)

摘要:在使用最新版的innobackupex(2.3.2):innobackupex/backup--rsync--user=xx --password=xxx 备份时报错:Error: can't create file (null)/xtrabackup_rsyncfiles_pass1网上搜索没有找... 阅读全文
posted @ 2015-11-18 12:01 digdeep 阅读(970) 评论(0) 推荐(0)

摘要:1. FATAL ERROR: Could not find ./bin/my_print_defaults[root@localhost scripts]# ./mysql_install_db --user=mysql --datadir=/var/lib/mysqlFATAL ERROR: ... 阅读全文
posted @ 2015-10-25 10:47 digdeep 阅读(4851) 评论(0) 推荐(0)

上一页 1 2 3 下一页
不懂数据库和Web安全的架构师不是一个好的程序员。