http:// thevpn.guru
asked on
Timeout error on starting MySQL after adding Master for replication
Hi All
I am trying to setup replication on my mysql server. I followed
http://www.howtoforge.com/mysql_database_replication
and added
log-bin = /var/log/mysql/mysql-bin.l og
binlog-do-db=exampledb
server-id=1
To [mysqld]
After that I tried to restart mysql and I got the error below:
Timeout error occurred trying to start MySQL Daemon.
I am running CentOS 4.5.
Did I miss anything here ?
Thanks
I am trying to setup replication on my mysql server. I followed
http://www.howtoforge.com/mysql_database_replication
and added
log-bin = /var/log/mysql/mysql-bin.l
binlog-do-db=exampledb
server-id=1
To [mysqld]
After that I tried to restart mysql and I got the error below:
Timeout error occurred trying to start MySQL Daemon.
I am running CentOS 4.5.
Did I miss anything here ?
Thanks
ASKER
tail -f /var/log/mysqld.log
shows nothing
and yes the db exists on master
shows nothing
and yes the db exists on master
Pls check the error log... the log file which you shown seems to be general query log.
Error log should be created under data dir & has .err extension.. by default file naming is something host_name.err
Pls check my.cnf if it has an entry for the error log.
Error log should be created under data dir & has .err extension.. by default file naming is something host_name.err
Pls check my.cnf if it has an entry for the error log.
ASKER
I checked no error log entries in my.cnf the only log entry is under [mysql_safe] if I want to add it under which section should i add it ?
should be under [mysqld]
mysqld_safe reads all options from the [mysqld], [server], and [mysqld_safe] sections in option files. For example, if you specify a [mysqld] section like this, mysqld_safe will find and use the --log-error option:
[mysqld]
log-error=/var/lib/mysqld. err
mysqld_safe reads all options from the [mysqld], [server], and [mysqld_safe] sections in option files. For example, if you specify a [mysqld] section like this, mysqld_safe will find and use the --log-error option:
[mysqld]
log-error=/var/lib/mysqld.
ASKER
Hi I did add
log-error=/var/log/mysqld. err
When I did the restart I got
/usr/libexec/mysqld: File '/var/log/mysql/mysql-bin. index' not found (Errcode: 13)
081028 9:01:16 [ERROR] Aborting
I created that file however now it just says :
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]
That is all I get even the error file is not throwing any error.
log-error=/var/log/mysqld.
When I did the restart I got
/usr/libexec/mysqld: File '/var/log/mysql/mysql-bin.
081028 9:01:16 [ERROR] Aborting
I created that file however now it just says :
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]
That is all I get even the error file is not throwing any error.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The principal problem is where you're trying to write the file to.
log-bin = /var/log/mysql/mysql-bin.l og
You're trying to write the binary log to /var/log/mysql/. /var/log/mysql is meant for log output from syslog and similar, while binary logs are actual mysql datafiles for the database.
Try changing your log-bin line to:
log-bin = /var/lib/mysql/mysql-bin
Next make sure that whatever db follows 'binlog-do-db=' does actually exist. So if you want to replicate the database named 'test', you'd have:
binlog-do-db=test
You should also refer to the excellent MySQL documentation on replication, found at:
http://dev.mysql.com/doc/refman/5.0/en/replication-implementation.html
log-bin = /var/log/mysql/mysql-bin.l
You're trying to write the binary log to /var/log/mysql/. /var/log/mysql is meant for log output from syslog and similar, while binary logs are actual mysql datafiles for the database.
Try changing your log-bin line to:
log-bin = /var/lib/mysql/mysql-bin
Next make sure that whatever db follows 'binlog-do-db=' does actually exist. So if you want to replicate the database named 'test', you'd have:
binlog-do-db=test
You should also refer to the excellent MySQL documentation on replication, found at:
http://dev.mysql.com/doc/refman/5.0/en/replication-implementation.html
Pls replace MySQlErrorLogFile.err with actual error log file(complete path).. error log should be n data dir
tail -n 100 MySQlErrorLogFile.err
BTW, Did you created schema named "exampledb" on master?