mysql 5.7忘记root密码
临时创建的一个测试库,忘记了root密码,用如下办法可以解决:一、通过编辑/etc/my.cnf文件在[mysqld]下面加上skip-grant-tables=1,保存退出;[mysqld] skip-grant-tables=1二、重启MySql服务[root@iZ2ze7qh6q0di3qkvef1dzZ etc]# systemctl stop m
ERROR 1786 (HY000): Statement violates GTID consistency: CREATE TABLE ... SELECT
在执行如下语句:create table gltable select * from mysql.user;报错如下:ERROR 1786 (HY000): Statement violates GTID consistency: CREATE TABLE&n
mysql批量kill session
有时候需要批量kill掉session,可以用以下办法,按照用户查出来,然后session信息,放到一个文件里,然后执行select concat('KILL ',id,';') from information_schema.processlist where user='xxx' into outfile '/var/lib/mysql-files/xxx.txt'; select concat('KILL ',id,';') from informati...
mysql报错Changed limits: max_open_files: 5000
OS:CentOS 7.4DB:mysql 5.7.17error.log日志里报错信息:2018-04-08T09:52:52.641263Z 0 [Warning] Changed limits: max_open_files: 5000 (requested 50000)2018-04-08T09:52:52.641467Z 0 [Warning] Changed limits: max_connections: 4190 (requested 10000)2018-04-08T09:52:52...
load data infile ERROR 1045 (28000)
非root用户在mysql server部署机器通过load data infile命令导入数据时,报错:ERROR 1045 (28000): Access denied for user 'xxx'@'xxx' (using password: YES) 可能原因:这个一般是因为非root用户没有FILE Privilege,可以通过show grants查看当前登陆用户的权限,也可以通过select mysql.user查看...
MySQL 授权时报错 ERROR 1819
昨天执行授权的时候报错如下:mysql> grant select, insert,update on cus_ent5ddf7b0e.* to fin_user@'192.168.2.78'; ERROR 1819 (HY000): Your password does not satisfy the current policy requirements出现这个错误的原因是,在这个实例上没有fin_user@'192.168.2.78'这个用户,所以...
MySQL 5.7锁的问题一例
今天晚上突然接到开发人员电话,说在查询一个表的时候无法返回结果,也就是hang住了,表名为oms_bdreturn_ref我首先登录系统查了下日志,没有报错。接着查询锁的情况mysql> show OPEN TABLES where In_use > 0; +----------+------------------------+--------+-------------+| Databa...
mysql主从跳过错误
stop slave;set global sql_slave_skip_counter=1;start slave;
Got timeout reading communication packets
环境:CentOS release 6.5 (Final),MySQL:5.7.12在error.log日志里有如下的提示,太多了,容易让人看不到重要的信息,所以打算屏蔽掉。11-28T19:20:55.658970+08:00 878538 [Note] Aborted connection 878538 to db: 'xxxx' user: 'oms_rw' host: 'xxx.xx.169.125' (Got timeout reading communication ...
阿里云centos7安装mysql报错conflicts with file from package mariadb-libs
操作系统环境:CentOS Linux release 7.4.1708 (Core)具体报错提示:[root@iZ2ze6jo3o3bqbcongnypqZ ~]# yum install mysql-community-common-5.7.17-1.el7.x86_64.rpmLoaded plugins: fastestmirrorExamining mysql-community-common-5.7.17-1.el7.x86_64.rpm: mysql-c...
MySQL master and slave have equal MySQL server UUIDs
今天从一个slave备份出来数据,想再创建一个slave,启动后报错:Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server UUIDs; these UUIDs must be different for replication to work.错误原因是直接备份的slave文件,导致uuid相同了,uuid是My...
MySQL ERROR 1031 (HY000) at line 33: Table storage engine for
今天从5.7mysqldump数据到5.6的时候遇到了ERROR 1031 (HY000) at line 33: Table storage engine for 'department' doesn't have this option错误查看department建表语句mysql> show create table department \G;*************************** 1. row *************************** ...
MySQl报错之@@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_MODE = ON
今天在一台MySQL数据库的SLAVE里dump出来一个databases的数据,想导入到另一台机器的数据库里,但是报错:Warning: Using a password on the command line interface can be insecure.ERROR 1839 (HY000) at line 24: @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_MODE = ON....
MySQL报错 Error_code: 1045
今天把两台机器恢复主从关系后,在slave上执行show slave status,结果中显示2017-04-21T13:46:15.133435Z 8806 [ERROR] Slave I/O for channel '': error connecting to master 'repl@192.168.2.40:3306' - retry-time: 60 retries: 1, Error_code: 1045首先查看slave的错误日志文件,和上面的...
MySQL 5.7.17 安装报错SSL error: Unable to get private key from
用源代码方式安装完5.7.17之后,启动mysql,日志文件里提示:点击(此处)折叠或打开2017-02-07T10:57:41.256534Z 0 [ERROR] SSL error: Unable to get private key from 'server-key.pem'2017-02-07T10:57:41.256544Z 0 [Warning] Failed to set up SSL because of the followi...
MySQL 5.7.17 安装报错CMake Error at cmake/boost.cmake:81 (MESSAGE)
MySQL5.7.17在cmake的时候报错如下:点击(此处)折叠或打开CMake Error at cmake/boost.cmake:81 (MESSAGE):You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=This CMake script will look for boost in . If it is not there,...
xtrabackup:error:streaming incremental backups are incompatible with the tar
innobackupex 2.4.5的increment备份还是不支持tar stream,希望以后可以支持点击(此处)折叠或打开[root@iZ252affh58Z mysql_incremental]# tail -f xtra_incrementalbak_2017-02-03.loginnobackupex version 2.4.5 based on MySQL server 5.7.13 Linux (x86_64) (revision i...
Access denied; you need (at least one of) the PROCESS privilege(s)
在帮一个朋友的数据库导出的时候遇到错误,如下:点击(此处)折叠或打开[root@iZ252affh58Z ~]# innobackupex --defaults-file=/etc/my.cnf --host=10.51.xxx.xxx --user=xtrabk --password=xxxxxx --stream=tar /tmp | gzip > /mnt/backup/mysql_full/xtra_fullbak_2017-01-20.tar.g...
MYSQL ERROR 2003 (HY000) Can
今天同事有个系统从另一台机器上连接报错,请我给看看,我试了一下,报错如下:点击(此处)折叠或打开[root@mysqltest ~]# mysql -h101.xxx.xxx.xx -ugl -p Enter password: ERROR 2003 (HY000): Can't connect to MySQL server on '101.xxx.xxx.xx(113)...
Mysql5.7错误日志时间不对的解决办法
MySQL 5.7的错误日志时间和系统时间不一致,看起来费劲,查阅官方文档得知从MySQL 5.7.2 开始,新增了 log_timestamps 参数,它主要是控制 error log、genera log等日志文件的显示时间参数:官文如下:This variable controls the timestamp time zone of error log messages, and of general query log and ...