Tag Archives: MySQL

[InnoDB] Tablespace 1, name ‘sys/sys_config’, file ‘./sys/sys_config.ibd’ is missing!

su - mysql -s /bin/bash
mysqld_safe --upgrade=MINIMAL --skip-grant-tables --skip-networking

mysql> DROP DATABASE sys;
ERROR 3679 (HY000): Schema directory './sys/' does not exist

mkdir /var/lib/mysql/sys
chown mysql:mysql /var/lib/mysql/sys

mysql> drop database sys;
Query OK, 101 rows affected (0.03 sec)

mysql 8 reset root password ubuntu

systemctl stop mysql.service
systemctl set-environment MYSQLD_OPTS=”–skip-networking –skip-grant-tables”
systemctl start mysql.service

ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘the-new-password’;
flush privileges;

systemctl unset-environment MYSQLD_OPTS
systemctl revert mysql.service
systemctl restart mysql.service

ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository


[Repl] Slave SQL for channel '': Slave failed to initialize relay log info structure from the repository, Error_code: MY-013124

mysql> start slave;
ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository

mysql> reset slave;
Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql> CHANGE MASTER TO MASTER_HOST='172.17.0.2', MASTER_USER='repl', MASTER_PASSWORD='mypassword', MASTER_LOG_FILE='binlog.000008', MASTER_LOG_POS=157;
Query OK, 0 rows affected, 8 warnings (0.01 sec)

Slave_IO_Running: Yes
Slave_SQL_Running: Yes

[Repl] Slave I/O thread for channel '': connected to master '[email protected]:3306',replication started in log 'binlog.000008' at position 157