Re: questions about merging
Might be a bit late, but on the naming issue: why not rename the tables on the old database before doing the dump? that would save you from potentially messing with your data due to parsing problems. Just a thought :) Walter OlinData: Professional services for MySQL Support * Consulting * Administration http://www.olindata.com On Fri, Jan 30, 2009 at 7:53 PM, Robert D. Crawford rd...@comcast.net wrote: Olaf Stein olaf.st...@nationwidechildrens.org writes: I think he only has one DB, I guess that is a provider restriction... True. I would create a separate db for each application if I could. rdc -- Robert D. Crawford rd...@comcast.net -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=li...@olindata.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: questions about merging
Walter Heck li...@olindata.com writes: Might be a bit late, Better late than never. but on the naming issue: why not rename the tables on the old database before doing the dump? that would save you from potentially messing with your data due to parsing problems. A good idea, but it wouldn't have worked for me. The original site was not mine and I didn't have permission to do so. Thanks, rdc -- Robert D. Crawford rd...@comcast.net -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: questions about merging
then: dump, import locally, rename and dump again. Still feels a bit safer then parsing though it might be a bit more work. OlinData: Professional services for MySQL Support * Consulting * Administration http://www.olindata.com On Sun, Feb 1, 2009 at 9:42 PM, Robert D. Crawford rd...@comcast.net wrote: Walter Heck li...@olindata.com writes: Might be a bit late, Better late than never. but on the naming issue: why not rename the tables on the old database before doing the dump? that would save you from potentially messing with your data due to parsing problems. A good idea, but it wouldn't have worked for me. The original site was not mine and I didn't have permission to do so. Thanks, rdc -- Robert D. Crawford rd...@comcast.net -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=li...@olindata.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: questions about merging
Robert, I know you have had other answers, but as to the database name, yes, you can remove the CREATE DATABASE statement and change the USE statement to the right database name. N.B. In our environment the students have only one database each, and will install blogs and wiki's etc. using that one db as the back end. Steve. On Wed, Jan 28, 2009 at 6:14 PM, Robert D. Crawford rd...@comcast.netwrote: Hello, Olaf, Stein, Olaf olaf.st...@nationwidechildrens.org writes: the import of the dump will not remove your other tables unless there is a naming conflict, then the table will be overwritten. As far as the prefix goes you can edit the dump file, find the create table statement for each table and add the prefix. If you have lots of tables or a huge dump file it might make sense to use a more automated approach, perl or python scripts will work on most platforms. The prefix will also make sure you have no naming conflicts I guess I figured that would be the case but I really needed to make sure. The file is huge but judicious use of head, emacs, and cat should do the job just fine without having to write something. One other question concerns these lines: CREATE DATABASE `db169254900`; USE db169254900; I can just remove the CREATE DATABASE line and change the USE line to reflect the name of the current db, right? Thanks for your help. My partner will be rather happy to have her wiki up. rdc -- Robert D. Crawford rd...@comcast.net Laugh at your problems; everybody else does.
Re: questions about merging
Robert, keep the two databases separated, that is on different mysql database (or schema as they are also called). If the wordpress blog is on a database named 'wpblog' for example import your dump in another newly created database. Could just use those statement in the dump file CREATE DATABASE `db169254900`; USE db169254900; it'll create and use a new database (logic separation / phisical different folders) You can have all the databases you want in MySQL, they are just logical separation between tables, and with MyISAM tables also phisical separation thru folders. cheers Claudio 2009/1/29 Robert D. Crawford rd...@comcast.net Hello, Olaf, Stein, Olaf olaf.st...@nationwidechildrens.org writes: the import of the dump will not remove your other tables unless there is a naming conflict, then the table will be overwritten. As far as the prefix goes you can edit the dump file, find the create table statement for each table and add the prefix. If you have lots of tables or a huge dump file it might make sense to use a more automated approach, perl or python scripts will work on most platforms. The prefix will also make sure you have no naming conflicts I guess I figured that would be the case but I really needed to make sure. The file is huge but judicious use of head, emacs, and cat should do the job just fine without having to write something. One other question concerns these lines: CREATE DATABASE `db169254900`; USE db169254900; I can just remove the CREATE DATABASE line and change the USE line to reflect the name of the current db, right? Thanks for your help. My partner will be rather happy to have her wiki up. rdc -- Robert D. Crawford rd...@comcast.net Laugh at your problems; everybody else does. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=claudio.na...@gmail.com
Re: questions about merging
I think he only has one DB, I guess that is a provider restriction... On 1/30/09 8:52 AM, Claudio Nanni claudio.na...@gmail.com wrote: Robert, keep the two databases separated, that is on different mysql database (or schema as they are also called). If the wordpress blog is on a database named 'wpblog' for example import your dump in another newly created database. Could just use those statement in the dump file CREATE DATABASE `db169254900`; USE db169254900; it'll create and use a new database (logic separation / phisical different folders) You can have all the databases you want in MySQL, they are just logical separation between tables, and with MyISAM tables also phisical separation thru folders. cheers Claudio 2009/1/29 Robert D. Crawford rd...@comcast.net Hello, Olaf, Stein, Olaf olaf.st...@nationwidechildrens.org writes: the import of the dump will not remove your other tables unless there is a naming conflict, then the table will be overwritten. As far as the prefix goes you can edit the dump file, find the create table statement for each table and add the prefix. If you have lots of tables or a huge dump file it might make sense to use a more automated approach, perl or python scripts will work on most platforms. The prefix will also make sure you have no naming conflicts I guess I figured that would be the case but I really needed to make sure. The file is huge but judicious use of head, emacs, and cat should do the job just fine without having to write something. One other question concerns these lines: CREATE DATABASE `db169254900`; USE db169254900; I can just remove the CREATE DATABASE line and change the USE line to reflect the name of the current db, right? Thanks for your help. My partner will be rather happy to have her wiki up. rdc -- Robert D. Crawford rd...@comcast.net Laugh at your problems; everybody else does. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=claudio.na...@gmail.com - Confidentiality Notice: The following mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. The recipient is responsible to maintain the confidentiality of this information and to use the information only for authorized purposes. If you are not the intended recipient (or authorized to receive information for the intended recipient), you are hereby notified that any review, use, disclosure, distribution, copying, printing, or action taken in reliance on the contents of this e-mail is strictly prohibited. If you have received this communication in error, please notify us immediately by reply e-mail and destroy all copies of the original message. Thank you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: questions about merging
Olaf Stein olaf.st...@nationwidechildrens.org writes: I think he only has one DB, I guess that is a provider restriction... True. I would create a separate db for each application if I could. rdc -- Robert D. Crawford rd...@comcast.net -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
questions about merging
Hello all, I hope I get the terminology right. I am not sure merge is what I want, so let me describe what I need. I have a sql dump from a db that is a mediawiki. I cannot upgrade the software on the old server and need to move it to a new server. I have only one db available to me on the new server that currently holds a wordpress blog. As I understand it this should be no problem as long as the table names do not conflict, right? I know the command for restoring the db from the mysql command prompt. First, I want to make sure that doing mysql -p dbname dump.sql is not going to hose the current db. Next I want to find out if there is an easy way to change the table names. I need the tables prefixed with the wiki name. Can anyone help me to figure out the easiest and safest way to accomplish this? If any more information is needed I can get it for you, I'm sure. Thanks in advance for any help or pointers to relevant documentation, rdc -- Robert D. Crawford rd...@comcast.net -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
RE: questions about merging
Robert, the import of the dump will not remove your other tables unless there is a naming conflict, then the table will be overwritten. As far as the prefix goes you can edit the dump file, find the create table statement for each table and add the prefix. If you have lots of tables or a huge dump file it might make sense to use a more automated approach, perl or python scripts will work on most platforms. The prefix will also make sure you have no naming conflicts I guess Olaf -Original Message- From: news on behalf of Robert D. Crawford Sent: Wed 1/28/2009 11:39 AM To: mysql@lists.mysql.com Subject: questions about merging Hello all, I hope I get the terminology right. I am not sure merge is what I want, so let me describe what I need. I have a sql dump from a db that is a mediawiki. I cannot upgrade the software on the old server and need to move it to a new server. I have only one db available to me on the new server that currently holds a wordpress blog. As I understand it this should be no problem as long as the table names do not conflict, right? I know the command for restoring the db from the mysql command prompt. First, I want to make sure that doing mysql -p dbname dump.sql is not going to hose the current db. Next I want to find out if there is an easy way to change the table names. I need the tables prefixed with the wiki name. Can anyone help me to figure out the easiest and safest way to accomplish this? If any more information is needed I can get it for you, I'm sure. Thanks in advance for any help or pointers to relevant documentation, rdc -- Robert D. Crawford rd...@comcast.net -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=ste...@ccri.net - Confidentiality Notice: The following mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. The recipient is responsible to maintain the confidentiality of this information and to use the information only for authorized purposes. If you are not the intended recipient (or authorized to receive information for the intended recipient), you are hereby notified that any review, use, disclosure, distribution, copying, printing, or action taken in reliance on the contents of this e-mail is strictly prohibited. If you have received this communication in error, please notify us immediately by reply e-mail and destroy all copies of the original message. Thank you.
Re: questions about merging
Hello, Olaf, Stein, Olaf olaf.st...@nationwidechildrens.org writes: the import of the dump will not remove your other tables unless there is a naming conflict, then the table will be overwritten. As far as the prefix goes you can edit the dump file, find the create table statement for each table and add the prefix. If you have lots of tables or a huge dump file it might make sense to use a more automated approach, perl or python scripts will work on most platforms. The prefix will also make sure you have no naming conflicts I guess I figured that would be the case but I really needed to make sure. The file is huge but judicious use of head, emacs, and cat should do the job just fine without having to write something. One other question concerns these lines: CREATE DATABASE `db169254900`; USE db169254900; I can just remove the CREATE DATABASE line and change the USE line to reflect the name of the current db, right? Thanks for your help. My partner will be rather happy to have her wiki up. rdc -- Robert D. Crawford rd...@comcast.net Laugh at your problems; everybody else does. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org