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
  #1  
Old 5th June 2012, 14:33
zephyrnet zephyrnet is offline
Junior Member
 
Join Date: Mar 2011
Posts: 16
Thanks: 3
Thanked 2 Times in 1 Post
Default installing-a-web-email-and-mysql-dbcluster-on-debian6

Hi,

Im following this tutorial http://www.howtoforge.com/installing...th-ispconfig-3

Ive followed up to foillowing steps:
scp -pr /var/lib/mysql/* root@server2.example.tld:/var/lib/mysql/
scp -pr /etc/mysql/debian.cnf root@server2.example.tld:/etc/mysql/debian.cnf
Now we start MySQL on the master server again:
/etc/init.d/mysql start
Log into the MySQL shell as root user...
mysql -u root -p

... and execute this command in the MySQL shell...

SHOW MASTER STATUS;
... to get the MySQL master status:

mysql> SHOW MASTER STATUS;
+------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000005 | 106 | | |
+------------------+----------+--------------+------------------+
1 row in set (0.00 sec)


after
Show SLave Status \g

I get ....

SHOW SLAVE STATUS \G
*************************** 1. row ***************************
Slave_IO_State: Connecting to master
Master_Host: xxx.xxx.xxx.60
Master_User: slaveuser
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000005
Read_Master_Log_Pos: 106
Relay_Log_File: mysqld-relay-bin.000001
Relay_Log_Pos: 4
Relay_Master_Log_File: mysql-bin.000005
Slave_IO_Running: No
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 106
Relay_Log_Space: 106
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 2013
Last_IO_Error: error connecting to master 'slaveuser@xxx.xxx.xxx.60:3306' - retry-time: 60 retries: 86400
Last_SQL_Errno: 0
Last_SQL_Error:

SO slave IO is not running :-(

When I tried the next part :

On server 2:
Log into the MySQL shell as root user...
mysql -u root -p

I get this error message :
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I think its because the tutorial said to switch off mysql on server 2 in a previous step, and never mentions to restart it. As if i start it again, it lets me log in. If so, Ive a feeling that server 2 should have either not been turned off, or turned on at some point before and possibly cause of previous errors. Ive been over and over it wit a fresh pair of eyes 5 times hence Master_Log_File: mysql-bin.000005

Is anyone able to point me in the right direction? I think Ive missed a really simple obvious step, but cant see where. Possibly one missing from howto? DO I need to reformat and start from scratch or can these be saved ?
Reply With Quote
Sponsored Links
  #2  
Old 5th June 2012, 14:42
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

Start the mysql on as first step after "On server 2:" and the error on the master will go away.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 5th June 2012, 15:22
zephyrnet zephyrnet is offline
Junior Member
 
Join Date: Mar 2011
Posts: 16
Thanks: 3
Thanked 2 Times in 1 Post
Default

Thanks Till. Really appreciate your assistance.
(server 2)
That error has gone away on but now I get

ERROR 29 (HY000): File '/var/lib/mysql/master.info' not found (Errcode: 13)
when running

STOP SLAVE;
CHANGE MASTER TO MASTER_HOST='xx.xx.xx.59', MASTER_USER='slaveuser', MASTER_PASSWORD='xxxxx', MASTER_LOG_FILE='mysql-bin.000005', MASTER_LOG_POS=106;
START SLAVE;

Ive googled it, but only suffered brain melt as a result.

(server 1)
When i run SHOW SLAVE STATUS \G i get the following - notice the bold bits :-(

Slave_IO_State:
Master_Host: x.x.x.60
Master_User: slaveuser
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000005
Read_Master_Log_Pos: 106
Relay_Log_File: mysqld-relay-bin.000001
Relay_Log_Pos: 4
Relay_Master_Log_File: mysql-bin.000005
Slave_IO_Running: No
Slave_SQL_Running: Yes

Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 106
Relay_Log_Space: 106
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 1236
Last_IO_Error: Got fatal error 1236 from master when reading dat a from binary log: 'Could not find first log file name in binary log index file'

Last_SQL_Errno: 0
Last_SQL_Error:
Reply With Quote
  #4  
Old 5th June 2012, 19:29
zephyrnet zephyrnet is offline
Junior Member
 
Join Date: Mar 2011
Posts: 16
Thanks: 3
Thanked 2 Times in 1 Post
Default

Ive tried everything i can think of, getting the last error I mentioned.

Ill have to start from beginning I think as im in a hurry, but would have been great to learn from my mistakes so idont make it again :-)

SO if anyone encounters same thing , and finds out why it happened, please do let me know
Reply With Quote
  #5  
Old 7th June 2012, 14:40
zephyrnet zephyrnet is offline
Junior Member
 
Join Date: Mar 2011
Posts: 16
Thanks: 3
Thanked 2 Times in 1 Post
 
Default installing web mailmysq database cluster debian - adding 2nd Slave

Hi,
The 2nd time around I followed this tutorial it worked SO many thanks

I now have 2 mirrored servers, although they are both in the same place.

How can I add a third server (2nd slave) into the mix ? For complete redundancy.

Also does anyone have any suggestions for some sort of automated backup? Of databases & files. Or is it easy to restore a failed server into the mix? I can only see some older tutorials, and technology moves so fast.....

Im guessing id need to, (well like to) image both master & slaves. For speedy recover in a crisis.

D
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
Installing A Web, Email & MySQL Database Cluster On Debian 6.0 With ISPConfig 3 - Hig dghvoip HOWTO-Related Questions 0 28th April 2012 07:22
Web, Email & MySQL Database Cluster xzibiz Installation/Configuration 3 2nd April 2012 09:54
Version 1.3 of the ISPConfig 3 Manual is finally available! falko General 44 2nd December 2011 13:04
Multiserver Setup With Dedicated Web, Email, DNS And MySQL Database Servers On Debian johjoh2k HOWTO-Related Questions 7 11th February 2011 15:26
RE: Installing A Web, Email And MySQL Database Cluster cjhmdm HOWTO-Related Questions 3 20th January 2011 19:43


All times are GMT +2. The time now is 20:45.


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