Manual procedure of syncing slave with he master
Below commands to be run on Slave
1. Check the slave status and Stop the slave its is running
mysql> show slave status\G
mysql> stop slave;
2. Get the dump of master server
shell> time mysqldump --opt -master_server_ip --master-data=1
--triggers --routines --databases DB1 DB2 DB3 DBn | gzip >
/path/to/dumpfile.gz
3. Once the above dump is over, you can start importing
shell> time gunzip –c /path/to/dumpfile.gz | mysql
Once the above import is done, start slave on slave
server<!--[endif]-->
mysql> show slave status\G
mysql> start slave;
In production environment you can do this kind of sync …
I have not got a chance to have a standard session on Velocity Conference this year, However I'm hosting the BOF. Bring your flash, IO Performance, and general performance stories and questions if you have any.
I also plan to attend the conference afternoon on Monday and mid day on Tuesday.
Entry posted by peter | One comment
[Read more]Last weekend, my brother and I attended SELF 2009. A few thoughts on it:
The mixture of sessions was interesting. There were some really good ones. I think the best session I attended was an OpenSolaris/NetBeans/Glassfish/Virtualbox/ZFS session, given by a Sun employee. He was an excellent presenter, and really showed off the strengths of the technologies in a nice way. He started up enough VMs to make his OpenSolaris laptop chew into swap, and I thought it was fun to see how it dealt with that. I’ve heard Solaris and OpenSolaris do a lot better at avoiding and managing swapping than GNU/Linux, but I couldn’t make any opinion from watching. I did think it was odd to have this session at a “Linux” (yes, they left off the GNU) conference. But I thought the session was a good addition to the conference. In other sessions, and in the hallways and expo, there was a lot more …
[Read more]Oracle/InnoBase announced the availability of the embedded version of InnoDB at this year's MySQL Conference & Expo, but I have not seen a lot of comments or reviews about it so far. Which surprises me, because I think this is a very interesting piece of technology!
In my opinion it might actually hit the sweet spot for application developers seeking an alternative embedded database solution. SQLite is nice and popular, but it seems to have concurrency issues when used in multi-threaded applications. An embedded MySQL …
[Read more]The PHP BBQ Tour is almost over. There is one chance left for you to come to a BBQ and to meet Giuseppe Maxia, the Datacharmer and leader of the MySQL Community team. The closing meeting will be held today in Kiel at the restaurant (not in the garden, no real BBQ, just like in Munich!) of the Forstbaumschule at 16:00 CEST. Its a little change in the location but no change in time.
Change for Kiel (today): due to rainy weather conditions we meet at the Forstbaumschule restaurant not in the garden, no BBQ but a meeting, just like in Munich. Same time (16:00 CEST), almost the same place as before the change. Seats have been reserved, ask for Wendel/PHP.
We had to move the Kiel BBQ to the restaurant due to bad weather conditions. It is just like yesterday …
[Read more]The PHP BBQ Tour is almost over. There is one chance left for you to come to a BBQ and to meet Giuseppe Maxia, the Datacharmer and leader of the MySQL Community team. The closing meeting will be held today in Kiel at the restaurant (not in the garden, no real BBQ, just like in Munich!) of the Forstbaumschule at 16:00 CEST. Its a little change in the location but no change in time.
Change for Kiel (today): due to rainy weather conditions we meet at the Forstbaumschule restaurant not in the garden, no BBQ but a meeting, just like in Munich. Same time (16:00 CEST), almost the same place as before the change. Seats have been reserved, ask for Wendel/PHP.
We had to move the Kiel BBQ to the restaurant due to bad weather conditions. It is just like yesterday …
[Read more]
A long standing bugAmong the many outstanding bugs for MySQL,
there is one that has sparked a fierce discussion, not only in
the bug report itself, but also in blogs, forums, mailing
lists.
Bug #19027: MySQL 5.0 starts even with Fatal InnoDB
errors was neglected for long time, until finally it got
fixed, and it is available in MySQL 5.1.36.
First off, what is it about?
In short, if an engine doesn't initialize correctly, the MySQL
server starts anyway, without the offending engine. Depending on
how you use the failing engine, this could be either a minor
annoyance or a complete disaster.
Annoyance: ARCHIVE fails to initialize, and you create
tables with the default engine (usually MyISAM), and after a
while you realize that the disk is filling up faster than you
expected. You will find out eventually.
Disaster: ARCHIVE fails to …
I spent some time earlier this week trying to debug a permissions problem in Drupal.
After a lot of head-scratching, it turned out that Drupal assumes that when you run INSERT queries sequentially on a table with an auto_increment integer column, the values that are assigned to this column will also be sequential, ie: 1, 2, 3, …
This might be a valid assumption when you are the only user doing inserts on a single MySQL server, but unfortunately that is not always the situation in which an application runs.
I run MySQL in a dual-master setup, which means that two sequential INSERT statements will never return sequential integers. The value will always be determined by the auto_increment_increment and auto_increment_offset settings in the configuration file.
In my case, one master will only assign even numbers, the other only uneven ones.
My …
[Read more]
They sometimes go bad in completely unpredictable ways. Here's a
problem I have now seen twice in production situations. A host
boots up nicely and mounts file systems from the SAN. At some
point a SAN switch (e.g., through a Fibrechannel controller)
fails in such a way that the SAN goes away but the file system
still appears visible to applications.
This kind of problem is an example of a Byzantine fault where a system does not fail
cleanly but instead starts to behave in a completely arbitrary
manner. It seems that you can get into a state where the
in-memory representation of the file system inodes is intact but
the underlying storage is non-responsive. The non-responsive file
system in turn can make operating system processes go a little
crazy. They continue to operate but show bizarre failures or
hang. The result is problems that may not be …
Sometime (rather I would say most of the time) you may need to
restore a single/specific database from the nightly backup but
unfortunately your nightly backup contains all the other
databases and restoring all the databases is not the solution as
we may end up losing some of the data which might be added to the
databases after the nightly backup. Fortunately there is one
option "--one-database" available in the 'mysql' command line
utility which comes into our rescue.
In order to restore a single database from the nightly backup you
can use the --one-database or -o option when restoring
shell>mysql --one-database required_db < /path/to/backup.sql
7TKU66CE8V5W