Add replication slave
Having some issues starting a replcation slave.
doing this in AWS with an EC2 instance.
my.cnf.slave looks like this
[mysqld]
bind-address=0.0.0.0
gtid_mode=ON
log_bin=binlog
log_slave_updates=1
enforce_gtid_consistency=ON
expire_logs_days=7
server_id=1001
binlog_format=ROW
slave_net_timeout=60
basedir=/usr
datadir=/data
i keep getting the issue that looks like this, i have tried using the basedir= /usr and /usr/share but always seems to be a hang up
Installation of system tables failed! Examine the logs in /data for more information. The problem could be conflicting information in an external my.cnf files. You can ignore these by doing: shell> /usr/scripts/scripts/mysql_install_db --defaults-file=~/.my.cnf You can also try to start the mysqld daemon with: shell> /usr/sbin/mysqld --skip-grant --general-log & and use the command line tool /usr/bin/mysql to connect to the mysql database and look at the grant tables: shell> /usr/bin/mysql -u root mysql mysql> show tables; Try 'mysqld --help' if you have problems with paths. Using --general-log gives you a log in /data that may be helpful. The latest information about mysql_install_db is available at https://mariadb.com/kb/en/installing-system-tables-mysql_install_db MariaDB is hosted on launchpad; You can find the latest source and email lists at http://launchpad.net/maria Please check all of the above before submitting a bug report at http://mariadb.org/jira
-
Hi!
Can you paste the content of the mysql error log here.
Usually found in:
/var/log/mysql/mysql*.log
/var/log/mysql*.log
/data/error.log
(basically it will be specified by the log-error directive in the /etc/
However, if it is indeed a MariaDB server then 'enforce_gtid_consistency' and 'gtid_mode=ON' are not an supported options.
BR
johan -
For MariaDB, tweak the my.cnf.slave template so it looks like:
[mysqld]
bind-address=0.0.0.0
log_bin=binlog
log_slave_updates=1
expire_logs_days=7
server_id=1001
binlog_format=ROW
slave_net_timeout=60
basedir=/usr
datadir=/dataThen ensure the server_id is indeed unique, and finally try the job again.
BR
johan
Please sign in to leave a comment.
Comments
3 comments