Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #11  
Old 16th October 2009, 07:37
v2k v2k is offline
Member
 
Join Date: Sep 2007
Location: Vancouver, Canada
Posts: 93
Thanks: 3
Thanked 1 Time in 1 Post
Default

I can't seem to get the slave to start with innodb; those errors kill it.

Here's the my.cnf on the slave:

http://pastie.org/657206
Reply With Quote
Sponsored Links
  #12  
Old 16th October 2009, 07:51
v2k v2k is offline
Member
 
Join Date: Sep 2007
Location: Vancouver, Canada
Posts: 93
Thanks: 3
Thanked 1 Time in 1 Post
Default

Ack, it looks like this is my problem, missing a major step for innodb:

http://dev.mysql.com/doc/refman/5.0/...db-backup.html
Reply With Quote
  #13  
Old 16th October 2009, 08:32
v2k v2k is offline
Member
 
Join Date: Sep 2007
Location: Vancouver, Canada
Posts: 93
Thanks: 3
Thanked 1 Time in 1 Post
Default

I copied over the .frm files from the master to the slave, but it's still failing saying they have incorrect information. The file it's complaining about is the same on master and slave.. and has not changed on the master since I did the mysqldump.

Copying the frm files also makes phpMyAdmin unable to load the database proberly, so I'm guessing this isn't the correct path...
Reply With Quote
  #14  
Old 17th October 2009, 03:55
v2k v2k is offline
Member
 
Join Date: Sep 2007
Location: Vancouver, Canada
Posts: 93
Thanks: 3
Thanked 1 Time in 1 Post
Default

I ended up dropping the slave's db and reimporting the dump file. It worked this time. I'm not sure what changed since the first attempt as I tried so many things.
Reply With Quote
  #15  
Old 3rd June 2010, 09:00
v2k v2k is offline
Member
 
Join Date: Sep 2007
Location: Vancouver, Canada
Posts: 93
Thanks: 3
Thanked 1 Time in 1 Post
Default

So I was forced to upgrade the slave server. Unfortunately, this broke my replication. I'm not sure how to get this going again without starting over from scratch:

Code:
100602 23:43:07  mysqld started
100602 23:43:07 [Warning] The syntax 'for replication startup options' is deprecated and will be removed in MySQL 6.0. Please use 'CHANGE MASTER' instead.
/usr/local/mysql/libexec/mysqld: Table 'mysql.plugin' doesn't exist
100602 23:43:07 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
InnoDB: Error: log file /usr/local/mysql/var/ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 16777216 bytes!
100602 23:43:07 [ERROR] Plugin 'InnoDB' init function returned error.
100602 23:43:07 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
100602 23:43:07 [ERROR] /usr/local/mysql/libexec/mysqld: unknown option '--skip-bdb'
100602 23:43:07 [ERROR] Aborting

100602 23:43:07 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

100602 23:43:07  mysqld ended
I tried running upgrade as it says:
Code:
[/usr/local/mysql] # ./bin/mysql_upgrade
Looking for 'mysql' as: ./bin/mysql
Looking for 'mysqlcheck' as: ./bin/mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/tmp/mysql.sock'
./bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed

I can't run the server because it needs to upgrade, and I can't upgrade because it needs to run the server... hrm.
Reply With Quote
  #16  
Old 3rd June 2010, 09:24
v2k v2k is offline
Member
 
Join Date: Sep 2007
Location: Vancouver, Canada
Posts: 93
Thanks: 3
Thanked 1 Time in 1 Post
Default

I found a thread about removing the ib_logfiles. I backed these up and tried this. This brings the server online, but I'm not sure yet if it's replicating:

Code:
100603 00:16:39  mysqld started
100603  0:16:39 [Warning] The syntax 'for replication startup options' is deprecated and will be removed in MySQL 6.0. Please use 'CHANGE MASTER' instead.
/usr/local/mysql/libexec/mysqld: Table 'mysql.plugin' doesn't exist
100603  0:16:39 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
100603  0:16:39  InnoDB: Started; log sequence number 5 400666124
100603  0:16:39 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
100603  0:16:39 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=VaHBoMM-relay-bin' to avoid this problem.
100603  0:16:39 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000328' at position 158108412, relay log './VaHBoMM-relay-bin.000626' position: 812320
100603  0:16:39 [ERROR] Error in Log_event::read_log_event(): 'Event too small', data_len: 0, event_type: 0
100603  0:16:39 [ERROR] Error reading relay log event: slave SQL thread aborted because of I/O error
100603  0:16:39 [ERROR] Slave SQL: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave. Error_code: 1594
100603  0:16:39 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.000328' position 158108412
100603  0:16:39 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MySQL 50037, now running 50136. Please use mysql_upgrade to fix this error.
100603  0:16:39 [ERROR] mysql.user has no `Event_priv` column at position 29
100603  0:16:39 [ERROR] Cannot open mysql.event
100603  0:16:39 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
100603  0:16:39 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '5.1.36-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
100603  0:16:39 [Note] Slave I/O thread: connected to master 'slave_user@10.0.0.111:3306',replication started in log 'mysql-bin.000331' at position 238320516
given what SHOW SLAVE STATUS is returning, I'm guess it's still offline.
Reply With Quote
  #17  
Old 3rd June 2010, 09:43
v2k v2k is offline
Member
 
Join Date: Sep 2007
Location: Vancouver, Canada
Posts: 93
Thanks: 3
Thanked 1 Time in 1 Post
Default

Using this guide to step over corrupted logs, it appears to be slowly working:
http://www.softwareprojects.com/reso...-sma-1859.html

Should I expect a lot of these errors, or is something else making it fail? I've stepped over 5 of these errors manually so far, so I suspect something must be very wrong.

Last edited by v2k; 3rd June 2010 at 09:50.
Reply With Quote
  #18  
Old 4th June 2010, 08:30
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

If I was you, I'd set up replication from scratch again - I think it's safer.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #19  
Old 5th June 2010, 11:50
v2k v2k is offline
Member
 
Join Date: Sep 2007
Location: Vancouver, Canada
Posts: 93
Thanks: 3
Thanked 1 Time in 1 Post
 
Default

Yes, that's probably best. I have no idea what the state of the data on the slave is now really. After skipping about 10 corrupted bits of logs, it eventually ran clean for the remainder of the replication and is now working.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
BIG Problem Postfix issue admins Installation/Configuration 11 13th November 2009 10:05
Problem installing MySQL on suse 10.3 Txchaser Installation/Configuration 20 18th April 2008 01:05
Management/system config/settings & /server/settings not working!! dactor Installation/Configuration 9 6th February 2008 09:11
Messed up ISPConfig-2.2.8 Upgrade Morons Installation/Configuration 4 29th November 2006 12:17
Mandriva 10.2 Perfect Setup Install Problems... ctroyp Installation/Configuration 12 30th December 2005 16:04


All times are GMT +2. The time now is 00:52.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.