RE: how to sync mysql.user table between to two mysql instances
Hello johan Here is what did the trick for me: 1. in mysql-inst1, I created like table called test.user 2. I used mysqldump to pipe test.user table from mysql-inst1 to mysql-inst2 3. in mysql-inst2, I did insert into mysql.user select from test.user We are migrating from master-slave replication to mysql cluster. My sysprog person has been doing all the work. I was told in a clustered environment, replication should happen automatically -- I'm still waiting for my mysql.user table to automatically syncs itself. A long wait it has been. Thanks -Original Message- From: Johan De Meersman [mailto:vegiv...@tuxera.be] Sent: Friday, March 16, 2012 5:00 PM To: Baron Schwartz Cc: MySql Subject: Re: how to sync mysql.user table between to two mysql instances - Original Message - > From: "Baron Schwartz" > > 1. With mysqldump. mysqldump -hmysql-inst1 mysql | mysql > -hmysql-inst2 mysql And then, of course, issue a FLUSH PRIVILEGES on mysql-inst2 :-) -- Bier met grenadyn Is als mosterd by den wyn Sy die't drinkt, is eene kwezel Hy die't drinkt, is ras een ezel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql This message is intended only for the use of the Addressee and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachments and notify us immediately. Thank you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: how to sync mysql.user table between to two mysql instances
- Original Message - > From: "Baron Schwartz" > > 1. With mysqldump. mysqldump -hmysql-inst1 mysql | mysql > -hmysql-inst2 mysql And then, of course, issue a FLUSH PRIVILEGES on mysql-inst2 :-) -- Bier met grenadyn Is als mosterd by den wyn Sy die't drinkt, is eene kwezel Hy die't drinkt, is ras een ezel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
RE: how to sync mysql.user table between to two mysql instances
I was trying to get a confirmation too. In any event, Charles, I'd try these three steps below and see what happens. I assume that information_schema is populated "on the fly". David. -Original Message- From: Brown, Charles [mailto:cbr...@bmi.com] Sent: Friday, March 16, 2012 2:59 PM To: David Lerer; Baron Schwartz; MySql Subject: RE: how to sync mysql.user table between to two mysql instances Hello David, Precisely, that's what my problem is. The users found in mysqlinst1 are not in mysqlinst2. There are about 30 users defined in inst1 and only 4 in inst2. I would like to sync these tables. How do you do it in short of creating 26 accounts in mysqlinst2 one at a time - too tedious. Help me I'm running out of time. -Original Message- From: David Lerer [mailto:dle...@us.univision.com] Sent: Friday, March 16, 2012 1:36 PM To: Baron Schwartz; MySql; Brown, Charles Subject: RE: how to sync mysql.user table between to two mysql instances As a follow up question, will it be ok to do the following: 1. mysqldump -hmysql-inst2 mysql 2. Backup mysql-inst1 and use the backup to restore to mysql-inst2 3. mysql -hmysql-inst2 mysql This way I hope to be able to refresh a DEV instance from a PROD database, but preserve the permissions, users, passwords, etc (Assuming of course that the schemas are identical on the two instances). Thanks, David. -Original Message- From: baron.schwa...@gmail.com [mailto:baron.schwa...@gmail.com] On Behalf Of Baron Schwartz Sent: Friday, March 16, 2012 2:20 PM To: MySql Subject: Re: how to sync mysql.user table between to two mysql instances Charles, 1. With mysqldump. mysqldump -hmysql-inst1 mysql | mysql -hmysql-inst2 mysql 2. With pt-table-sync from Percona Toolkit if you need something more sophisticated. On Fri, Mar 16, 2012 at 1:27 PM, Brown, Charles wrote: > Can someone instruct me on how to sync mysql.user table between to two mysql > instances. > In other words, I wouild like to copy mysql.user from mysql-inst1 to > mysql-inst2 + -- Baron Schwartz Win free MySQL conference tickets! http://goo.gl/mvZ4W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql The information contained in this e-mail and any attached documents may be privileged, confidential and protected from disclosure. If you are not the intended recipient you may not read, copy, distribute or use this information. If you have received this communication in error, please notify the sender immediately by replying to this message and then delete it from your system. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql This message is intended only for the use of the Addressee and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachments and notify us immediately. Thank you. The information contained in this e-mail and any attached documents may be privileged, confidential and protected from disclosure. If you are not the intended recipient you may not read, copy, distribute or use this information. If you have received this communication in error, please notify the sender immediately by replying to this message and then delete it from your system. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
RE: how to sync mysql.user table between to two mysql instances
Hello David, Precisely, that's what my problem is. The users found in mysqlinst1 are not in mysqlinst2. There are about 30 users defined in inst1 and only 4 in inst2. I would like to sync these tables. How do you do it in short of creating 26 accounts in mysqlinst2 one at a time - too tedious. Help me I'm running out of time. -Original Message- From: David Lerer [mailto:dle...@us.univision.com] Sent: Friday, March 16, 2012 1:36 PM To: Baron Schwartz; MySql; Brown, Charles Subject: RE: how to sync mysql.user table between to two mysql instances As a follow up question, will it be ok to do the following: 1. mysqldump -hmysql-inst2 mysql 2. Backup mysql-inst1 and use the backup to restore to mysql-inst2 3. mysql -hmysql-inst2 mysql This way I hope to be able to refresh a DEV instance from a PROD database, but preserve the permissions, users, passwords, etc (Assuming of course that the schemas are identical on the two instances). Thanks, David. -Original Message- From: baron.schwa...@gmail.com [mailto:baron.schwa...@gmail.com] On Behalf Of Baron Schwartz Sent: Friday, March 16, 2012 2:20 PM To: MySql Subject: Re: how to sync mysql.user table between to two mysql instances Charles, 1. With mysqldump. mysqldump -hmysql-inst1 mysql | mysql -hmysql-inst2 mysql 2. With pt-table-sync from Percona Toolkit if you need something more sophisticated. On Fri, Mar 16, 2012 at 1:27 PM, Brown, Charles wrote: > Can someone instruct me on how to sync mysql.user table between to two mysql > instances. > In other words, I wouild like to copy mysql.user from mysql-inst1 to > mysql-inst2 + -- Baron Schwartz Win free MySQL conference tickets! http://goo.gl/mvZ4W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql The information contained in this e-mail and any attached documents may be privileged, confidential and protected from disclosure. If you are not the intended recipient you may not read, copy, distribute or use this information. If you have received this communication in error, please notify the sender immediately by replying to this message and then delete it from your system. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql This message is intended only for the use of the Addressee and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachments and notify us immediately. Thank you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
RE: how to sync mysql.user table between to two mysql instances
As a follow up question, will it be ok to do the following: 1. mysqldump -hmysql-inst2 mysql 2. Backup mysql-inst1 and use the backup to restore to mysql-inst2 3. mysql -hmysql-inst2 mysql This way I hope to be able to refresh a DEV instance from a PROD database, but preserve the permissions, users, passwords, etc (Assuming of course that the schemas are identical on the two instances). Thanks, David. -Original Message- From: baron.schwa...@gmail.com [mailto:baron.schwa...@gmail.com] On Behalf Of Baron Schwartz Sent: Friday, March 16, 2012 2:20 PM To: MySql Subject: Re: how to sync mysql.user table between to two mysql instances Charles, 1. With mysqldump. mysqldump -hmysql-inst1 mysql | mysql -hmysql-inst2 mysql 2. With pt-table-sync from Percona Toolkit if you need something more sophisticated. On Fri, Mar 16, 2012 at 1:27 PM, Brown, Charles wrote: > Can someone instruct me on how to sync mysql.user table between to two mysql > instances. > In other words, I wouild like to copy mysql.user from mysql-inst1 to > mysql-inst2 + -- Baron Schwartz Win free MySQL conference tickets! http://goo.gl/mvZ4W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql The information contained in this e-mail and any attached documents may be privileged, confidential and protected from disclosure. If you are not the intended recipient you may not read, copy, distribute or use this information. If you have received this communication in error, please notify the sender immediately by replying to this message and then delete it from your system. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: how to sync mysql.user table between to two mysql instances
Charles, 1. With mysqldump. mysqldump -hmysql-inst1 mysql | mysql -hmysql-inst2 mysql 2. With pt-table-sync from Percona Toolkit if you need something more sophisticated. On Fri, Mar 16, 2012 at 1:27 PM, Brown, Charles wrote: > Can someone instruct me on how to sync mysql.user table between to two mysql > instances. > In other words, I wouild like to copy mysql.user from mysql-inst1 to > mysql-inst2 + -- Baron Schwartz Win free MySQL conference tickets! http://goo.gl/mvZ4W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql