随笔分类 - mysql
摘要:1、yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm2、percona-release3、yum install percona-toolkit
阅读全文
摘要:1. /etc/my.cnf [client]socket=/usr/local/mydb/mysql.sockuser=rootpassword=tiger#skip-binary-as-hex [mysqld]datadir=/usr/local/mydbbasedir=/usr/local/m
阅读全文
摘要:注意:step 6 ,要操作如下1,2步骤
阅读全文
摘要:ERROR 2061 (HY000): Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection. 1. Remove the repluser dr
阅读全文
摘要:准备: 1)二进制mysql数据库8.0安装软件 2) my.cnf 3) 如下脚本 #!/usr/bin/sh Data_dir='/usr/local/mydb'Mysql_dir='/usr/local/mysql'Log_file='file.log' CHK_DIR(){ if [ -d
阅读全文
摘要:mysqldump --single-transaction --master-data=1 --triggers -R -B dbtest |gzip -c |ssh root@192.168.100.100 'cat > /tmp/dbtest.sql.gz' xtrabackup 2.4 ./
阅读全文
摘要:sysbench io压测sysbench --test=fileio --file-num=4 --file-block-size=16384 --file-total-size=20G --file-test-mode=rndrd --file-extra-flags=direct prepar
阅读全文
摘要:操作系统关闭swap磁盘调度算法设置为:deadline或者noopecho deadline > /sys/block/sda/queue/schedulermount -o noatime,nobarrier /dev/sdb1 /data
阅读全文
摘要:set @s = 'SELECT * FROM employees WHERE emp_no = ?'set @a = 100000;PREPARE stmt FROM @s;EXECUTE stmt USING @a;DEALLOCATE PREPARE stmt;
阅读全文
摘要:1.建议主键创建 bigint 2. signed选择有负号的(不推荐使用unsigned,可能出现溢出现象)3. auto_increment (重启实例,auto_increment可能回溯) 小数1.建议使用decimal(float,double精度不够) rand函数(插入测试数据)rep
阅读全文
摘要:mysql单机多实例 [mysqld_multi]mysqld=/usr/local/mysql/bin/mysqld_safemysqladmin=/usr/local/mysql/bin/mysqldadminlog=/usr/local/mysql/mysqld_multi.log [mysq
阅读全文
摘要:# author: jiangchengyao[client]user = rootpassword = 1111aaA_ [mysql]prompt = [\\u@\\p][\\d]>\\_no-auto-rehash [mysqld_safe]malloc-lib=tcmalloc [mysql
阅读全文
摘要:1./etc/init.d/mysqld stop (关闭mysql进程) 2.备份 data(数据datadir)目录 3.用高版本的mysql安装目录(basedir)替换 低版本mysql安装目录 4.调整/etc/my.cnf 中的个别参数 5.启动mysqld_safe --user=my
阅读全文