[kwlug-disc] how to duplicate a mysql database?
kb at 2bits.com
Tue Aug 25 16:50:58 EDT 2009
It is actually difficult to do what you have seen. The hardest part is
assigning permissions for a user. You can skip that if you are testing with
# mysqladmin create newdb
mysql> GRANT ALL ON newdb.* to someuser at localhost IDENTIFIED BY 'somepass';
# mysqldump olddb | mysql newdb
That is it.
On Tue, Aug 25, 2009 at 4:31 PM, Robert P. J. Day <rpjday at crashcourse.ca>wrote:
> i just want to make another "test" copy of a mysql database on the
> same system, to mess with while leaving the original alone. the
> solution i've seen is to use mysqldump to dump it, then restore it
> under another name. that, of course, works but is there an internal
> mysql command that will do that? i didn't notice one.
> Robert P. J. Day Waterloo, Ontario, CANADA
> Linux Consulting, Training and Annoying Kernel Pedantry.
> Web page: http://crashcourse.ca
> Twitter: http://twitter.com/rpjday
> kwlug-disc_kwlug.org mailing list
> kwlug-disc_kwlug.org at kwlug.org
Khalid M. Baheyeldin
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra
Simplicity is the ultimate sophistication. -- Leonardo da Vinci
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the kwlug-disc