Hi list, I have a question about replication in MySQL. I have mysql 4.0.12 (master and slave) on windows 2000.
Can I make master and slave on the same computer?
If I have the master on disk c, and the slave on disk d: 1) When do I put the my.ini file of the slave? 2) How can I stop and start the slave server? If I run the command NET STOP Mysql it stop the server on disk c..
Thanks very much Inbal
------------------------------8<------------------------
I think it should be possible. Trying the same thing here under linux with a config like this:
[mysqld_multi] mysqld = /usr/bin/safe_mysqld mysqladmin = /usr/bin/mysqladmin user = <user> password = <pass>
[mysqld1] datadir = /var/lib/mysql socket = /var/lib/mysql/mysql.sock port = 3306 pid-file = /var/lib/mysql/hostname.pid skip-locking skip-innodb set-variable = max_connections=300 set-variable = key_buffer=512M set-variable = max_allowed_packet=1M set-variable = table_cache=384 set-variable = sort_buffer=128M set-variable = join_buffer_size=64M set-variable = record_buffer=512M set-variable = net_buffer_length=8K set-variable = myisam_sort_buffer_size=256M log-bin server-id = 1
[mysqld2] datadir = /var/lib/mysqlrep socket = /var/lib/mysqlrep/mysql.sock port = 3307 pid-file = /var/lib/mysqlrep/hostname.pid skip-locking skip-innodb set-variable = max_connections=300 set-variable = key_buffer=512M set-variable = max_allowed_packet=1M set-variable = table_cache=384 set-variable = sort_buffer=128M set-variable = join_buffer_size=64M set-variable = record_buffer=512M set-variable = net_buffer_length=8K set-variable = myisam_sort_buffer_size=256M master-host = localhost master-user = repl master-password = <password> master-port = 3306 server-id = 2 replicate-do-db = nuria replicate-ignore-db = mysql
[mysql.server] user=mysql basedir=/var/lib
[safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid
HOWEVER, although it seems to try and replicate there must still be something with this config, because i can run both daemons but not at the same time. E.g. mysqld_multi start 1 works fine but when I start the second the errorlog shows me this:
030527 17:26:14 mysqld started
/usr/libexec/mysqld: ready for connections
030527 17:26:14 Slave thread: error connecting to master: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) (0), retry in 60 sec
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail
key_buffer_size=536866816 record_buffer=536866816 sort_buffer=134217720 max_used_connections=0 max_connections=300 threads_connected=0 It is possible that mysqld could use up to key_buffer_size + (record_buffer + sort_buffer)*max_connections = 4193097 K bytes of memory Hope that's ok, if not, decrease some variables in the equation
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0x4001f40c, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x80e345c
0x4007d618
0xffffffff
0x80e3a5b
0x400782b6
0x420de407
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://www.mysql.com/doc/U/s/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
The manual page at http://www.mysql.com/doc/C/r/Crashing.html contains
information that should help you find out what is causing the crash
Number of processes running now: 0
Still looking into it...... Let me know when you find out anything.