mysqldump products >products.sql
grep s/products/products1/ < products.sql > products1.sql
mysql < products1.sql

Assuming that nothing else in the database is named products. (i.e. you
don't have any fields or tables named products) If you did have fields or
tables, you would most likely have to make the edits by hand to
products.sql.

or in keeping with my 'dangerous ideas' theme:

mysqldump products | grep s/products/products1/ > mysql

(I am rusty on my regex so I'd check that s// expression before I used it)

Cal
*
* Cal Evans
* Senior Internet Dreamer
* http://www.calevans.com
*
----- Original Message -----
From: "Victor Spång Arthursson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 09, 2001 12:35
Subject: Easiest way to create a duplicate of a db?


> For example if I want a copy of products named products1?
>
> Sincerely Victor
>
> query
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to