centos 6.5 mysql5.7 在从库作stop slave时报: error:ERROR 1794 (HY000): Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in the MySQL erro…
背景: zabbix 数据库迁移,搭建主从,主是5.6.25,从是5.7.15,流式备份应用 redo.log 之后,change master 和reset slave 时报出如下错误 mysql> CHANGE MASTER TO -> MASTER_HOST='192.168.40.129', -> MASTER_USER='repl', -> MASTER_PASSWORD='repl_123', -> MASTER_PORT=3306, -> MASTER_L…
ERROR 1794 (HY000): Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in the MySQL error log.  error log中有类似日志:2016-05-10 17:21:25 …
salve复制线程停止,尝试start slave 时报ERROR 1872错误mysql> system perror 1872 MySQL error code 1872 (ER_SLAVE_RLI_INIT_REPOSITORY): Slave failed to initialize relay log info structure from the repository解决过程1.看样子是找不到中继日志的仓库,但是查看变量relay log的位置是设置了的mysql> show va…
mysql> start slave; ERROR (HY000): Slave failed to initialize relay log info structure from the repository 处理一则MySQL Slave环境出现ERROR 1201 (HY000): Could not initialize master info structure的案例.   冷备份方式复制一份新的slave,初始化参数中已经修改了相关文件路径及server_id等关联参数. 但在启动…
今天在使用冷备份文件重做从库时遇到一个报错,值得研究一下. 版本:MySQL5.6.27 一.报错现象 dba:(none)> start slave; ERROR (HY000): Slave failed to initialize relay log info structure from the repository 这个时候查看error.log: 2017-07-17 16:19:02 9022 [ERROR] Failed to open the relay log './tjtx…
主从都开启了gtid,在设置从库的时候遇到了问题 mysql> CHANGE MASTER TO MASTER_HOST=‘xxx’,MASTER_USER='replicant',MASTER_PASSWORD=‘xxx’, MASTER_LOG_FILE='bin.000050', MASTER_LOG_POS=191; ERROR 1776 (HY000): Parameters MASTER_LOG_FILE, MASTER_LOG_POS, RELAY_LOG_FILE and REL…
连接 amoeba-mysql出现Could not create a validated object, cause: ValidateObject failed mysql> start slave;ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository 原因:检查my.cnf,原来没指定relay_log,mysql默认产生的relay_log名被该server上…
1.数据类型      2.数据表的引擎 数据表 mysql> show tables; +------------------+ | Tables_in_market | +------------------+ | customers_info | | orders | +------------------+ rows in set (0.00 sec) 遇到错误信息 mysql> alter table orders add constraint fk_orders foreign k…
我的环境:Mac 10.11.6 ,mysql  5.7.14  . mac mySql 报错ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 这个错是链接时报的错,要链接必须启动.修复的时候首先要启动mysql. 首先来了解一下 mysql.sock的作用: Mysql有两种连接方式: (1),TCP/IP (2),socket 对mysql.sock来说,其…
mysql安装过程中出现错误ERROR 1820 (HY000): You must SET PASSWORD before executing this statement解决   最近新装好的mysql在进入mysql工具时,总是有错误提示: # mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) 或者 # mys…
今日某系统mysql root用户kill connection时报ERROR 1095 (HY000): You are not owner of thread N 按说通过root用户具有super权限,不应该会出现这种情况,最后通过关闭客户端相关连接使得问题临时解决. 事后经测试,当session在执行ddl语句时,如果kill connection时报ERROR 1095 (HY000): You are not owner of thread N,如下: | 2714 | root |…
ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) 错误的原因: Mysql配置了复制,复制功能也就意味着Master…
在还原数据库时报错,报错信息如下:(库中的表比较多) ERROR 23 (HY000) at line 29963: Out of resources when opening file 解决方法: 在root下修改ulimit值 [root@yoon export]# ulimit -acore file size          (blocks, -c) 0data seg size           (kbytes, -d) unlimitedscheduling priority  …
授权用户时报错,ERROR 1819 (HY000): Your password does not satisfy the current policy requirements 原因为其实与validate_password_policy的值有关 mysql> SHOW VARIABLES LIKE 'validate_password%'; +--------------------------------------+--------+ | Variable_name | Value |…
centos7.5 登入mysql,进行授权报错 问题: mysql> grant all privileges on *.* to 'lvhanzhi'@'%' identified by 'Bgx123.com'; ERROR 3009 (HY000): Column count of mysql.user is wrong. Expected 45, found 42. Created with MySQL 50560, now running 50725. Please use mysq…
今天接到主从复制失败告警,查看MySQL,发现MySQL能够登陆但是执行命令报错, ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. 因为是用户密码过期了 解决办法: 登陆MySQL命令行,执行 set password=password("password"); flush privileges; #设置用户密码永不过…
连接mysql,结果出错: ? 1 ERROR 1040 (HY000): Too many connections 去修改mysql的配置文件,然后添加: ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 root@bogon:logs# vi /etc/my.cnf   [mysqld] lower_case_tabl…
今天在上班过程中需要将一个1.3G的数据库sql文件导入到mysql数据库中去,在执行过程遇到了一些问题,执行到一半时报错,错误如下 ERROR 2006 (HY000) at line 1016: MySQL server has gone away 报错后百度查了下资料,大概是因为mysql在导入数据时sql语句过长,超过了mysql的max_allowed_packet的限制,这个可以通过修改这个 参数的大小来调节: set global max_allowed_packet=1024*1…
Mysql导入csv文件时报错:ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv opti on so it cannot exe 原因:mysql导入导出文件只能在secure-file-priv该变量配置的指定路径下的文件才可以导入导出. 解决方法: 1.查看本地secure-file-priv变量配置 mysql窗口下,输入命令: show variables like '%secure%…
MySQL在授权用户时出现报错信息,具体信息如下: 一.错误信息 执行命令: GRANT SELECT,INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION…
1. mysql --help 2.报错 报错Warning: World-writable config file http://www.jb51.net/article/99027.htm 最近在维护公司服务器的时候,在关闭数据库的命令发现mysql关不了了,提示错误为Warning: World-writable config file '/etc/my.cnf' is ignored,通过查找网上的资料终于解决了,现在将解决的方法分享给大家,同样遇到这个问题的朋友们可以参考借鉴. 问题分…
mac上安装过mysql: 然而,尝试连接时报错: $ mysql -u root -p Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 尝试去查看mysql.socket文件,发现没有.. $ which mysql /usr/local/bin/mysql 然后试试重启mysql: $ mysql.server start…
有以下两张表: mysql> show tables; +---------------+ | Tables_in_old | +---------------+ | book | | press | +---------------+ 2 rows in set (0.00 sec) mysql> desc book; +----------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key |…
务上需要支持create table XXX as select * from XXX; 这种创建表的语法,但是MySQL5.7.x版本里面gtid是开启的,会报错 ERROR 1786 (HY000):Statement violates GTID consistency: CREATE TABLE ... SELECT. 官方说明:https://dev.mysql.com/doc/refman/5.7/en/replication-gtids-restrictions.html CREAT…
原因:MySQL账户表中已经存在这个要创建的用户 操作分析: 当创建新用户时会提示这个新用户创建失败,但是当解决创建失败的问题后再次重新创建这个新用户,则会报这个错误 # 创建新用户,提示root用户没有SYSTEM_USER权限,创建失败 mysql> create user 'proxysql'@'192.168.20.%' identified with mysql_native_password by 'iD!^^EjU#Yxr5$p'; ERROR 1227 (42000): Acce…
在删除数据库的时候报标题所示错误 mysql> drop database test; ERROR (HY000): Error dropping database (can't rmdir './test/', errno: 17) 问题原因: test目录下存在着MySQL数据库不知道的文件,即MySQL数据库中没有该文件的数据字典信息. 如下所示, [root@localhost data]# cd /usr/local/mysql-advanced--linux-glibc2.-x86_…
远程连接mysql数据库时可以使用以下指令 mysql -h 192.168.1.104 -u root -p 如果是初次安装mysql,需要将所有/etc/mysql/内的所有配置文件的bind-address=127.0.0.1全都注释掉 [mysqld] # # * Basic Settings # user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = b…
MySQL创建用户(包括密码)时,会提示ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number: 问题原因:你输入的密码是明文.不允许这么输入. 解决办法:用select password('你想输入的密码');查询出你的密码对应的字符串, 然后用这个字符串在创建用户命令中替换你的密码.…
有时候,当我们使用"mysql"."mysqladmin"."mysqldump"等命令管理数据库时,服务器抛出类似如下错误: 一.错误现场还原:下面我们通过三种方式来连接,然后观察提示的错误信息: 1.直接使用"mysql"命令,不带主机名参数: 2.使用带了主机名"localhost"参数的"mysql -h localhost"命令: 3.使用带了主机名"127.0.0.…