Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 14th June 2009, 22:12
Stephan Stephan is offline
Junior Member
 
Join Date: Jun 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Mysql 2 servers, 2 mysql on each server, one database

Hello,

I need a help with mysql. I currently have two servers and i want on each server to run mysql with the same database\same content. is it a way to mirror mysql?

please help me with that.

my linux: centos5
mysql 5
Reply With Quote
Sponsored Links
  #2  
Old 14th June 2009, 22:39
id10t id10t is offline
Senior Member
 
Join Date: Nov 2008
Posts: 242
Thanks: 2
Thanked 22 Times in 22 Posts
Default

You want to look into replication
Reply With Quote
  #3  
Old 14th June 2009, 22:54
Stephan Stephan is offline
Junior Member
 
Join Date: Jun 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by id10t View Post
You want to look into replication
can you explain what it is and how to do it?
Reply With Quote
  #4  
Old 14th June 2009, 23:29
robertlouwen robertlouwen is offline
Senior Member
 
Join Date: Apr 2009
Location: Brielle, Netherlands
Posts: 141
Thanks: 20
Thanked 3 Times in 2 Posts
Default

@ Stephan

Falko wrote a easy to follow, two pages tutorial for mysql replication.
You can find it here http://www.howtoforge.net/mysql_database_replication

Good luck
Robert
__________________
With Respect, Robert
------------------------------------------------
Fedora 15 - ISPConfig v3.0.3.3
On Dell Optiplex GX270, Pentium 4, 2.8 GHz, 1024 Mb
Reply With Quote
  #5  
Old 15th June 2009, 01:20
Stephan Stephan is offline
Junior Member
 
Join Date: Jun 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks guys. i'll try Falko tutorial

Last edited by Stephan; 15th June 2009 at 01:22.
Reply With Quote
  #6  
Old 15th June 2009, 06:56
Stephan Stephan is offline
Junior Member
 
Join Date: Jun 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

mysql> LOAD DATA FROM MASTER;
ERROR 1189 (08S01): Net error reading from master

i get this error
Reply With Quote
  #7  
Old 15th June 2009, 15:51
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

Use a database dump instead of the LOAD DATA FROM MASTER method.
__________________
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
  #8  
Old 16th June 2009, 08:57
Stephan Stephan is offline
Junior Member
 
Join Date: Jun 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko View Post
Use a database dump instead of the LOAD DATA FROM MASTER method.
i did it, but the content not mirroring on slave mysql
__________________
Apache forver!
Reply With Quote
  #9  
Old 16th June 2009, 15:00
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

Did you use this command to import the SQL dump on the slave?

Code:
mysql -u root -p<password> exampledb < /path/to/exampledb.sql
Did you see any errors?
__________________
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
  #10  
Old 16th June 2009, 18:24
Stephan Stephan is offline
Junior Member
 
Join Date: Jun 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Quote:
Originally Posted by falko View Post
Did you use this command to import the SQL dump on the slave?

Code:
mysql -u root -p<password> exampledb < /path/to/exampledb.sql
Did you see any errors?
yes, i did...

ps
no errors at mysql restart
__________________
Apache forver!
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
configuring web server , mysql server demirrt Installation/Configuration 5 27th May 2009 00:03
Upgradeded to mysql4.1 breaks mysql client PoleCat Installation/Configuration 5 22nd April 2008 18:38
How To ACCESS MySQL DATABASE FROM PHP CODE FOR SQUIRRELMAIL SERVER Ghose Sumon HOWTO-Related Questions 1 21st May 2007 22:41
mysql clustering problem : cannot create table in database prince.fer Server Operation 2 16th April 2007 18:03
Problems with Postfix Mysql Courier PatrickAdrichem Installation/Configuration 3 13th April 2007 16:44


All times are GMT +2. The time now is 13:50.


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