Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => SMF Feedback and Discussion => Aiheen aloitti: Awesom - lokakuu 12, 2007, 08:12:26 AP

Otsikko: MySQL DB Transfer.
Kirjoitti: Awesom - lokakuu 12, 2007, 08:12:26 AP
How can I upload my database to another forum.

I downloaded the database form the old forum now I need to upload it but how can I do it and does it matter if the database names are different? Is this even possible?

Cheers.
Otsikko: Re: MySQL DB Transfer.
Kirjoitti: 青山 素子 - lokakuu 12, 2007, 10:53:03 AP
Saving/Restoring, and Moving SMF From a Host to Another (http://docs.simplemachines.org/index.php?board=83.0;sort=subject)
Otsikko: Re: MySQL DB Transfer.
Kirjoitti: Awesom - lokakuu 12, 2007, 10:02:26 IP
Thanks.

Otsikko: Re: MySQL DB Transfer.
Kirjoitti: Awesom - lokakuu 12, 2007, 10:11:48 IP
Error

SQL query:

# MySQL Quick Admin Database Backup
# Backup made: October 12, 2007, 6:48 am
# Database: javaownz_zendurl1
# --------------------------------------------------------
#
# Table structure for table 'smf_attachments'
#
DROP TABLE IF EXISTS `smf_attachments` ;

MySQL said: Documentation
#1046 - No database selected

I get this error when importing it to new site.
Otsikko: Re: MySQL DB Transfer.
Kirjoitti: 青山 素子 - lokakuu 12, 2007, 10:58:58 IP
That means the backup didn't have a database creation command in it. You'll need to create the database using the tools your host provides, then run the import with that database selected (in phpMyAdmin, use the import tab once you've clicked on the database name).
Otsikko: Re: MySQL DB Transfer.
Kirjoitti: babjusi - lokakuu 12, 2007, 11:02:10 IP
How mb is your backup copy? Because phpmyadmin is known to have size limits. If your back is above the limit, then you will have to restore it in other ways then
Otsikko: Re: MySQL DB Transfer.
Kirjoitti: Awesom - lokakuu 13, 2007, 01:46:07 AP
Thanks, I will try what you said now motoko sounds like it will work.

@babjusi Thanks but I know that the limit for my phpmyadmin is 10mb and my db is only 3mb ;)
Otsikko: Re: MySQL DB Transfer.
Kirjoitti: metallica48423 - lokakuu 13, 2007, 01:50:53 AP
it could also mean it literally, did you pick a database in the left pane of phpmyadmin before going to 'import'? :P
Otsikko: Re: MySQL DB Transfer.
Kirjoitti: Awesom - lokakuu 13, 2007, 02:03:17 AP
I open phpmyadmin separately with each database it has:  databasename - settings - phpmyadmin and its a button.

I also tried motoko's idea and it didn't work but I think I know why.

my database name I created couldn't be exactly the same so does it need to be and for all parts? Because the old forums I had have like

/home/zendurl/public_html/j/javaownz/forums/Sources/

and my new forums would only be (I don't know exact atm I can find obviously if it's important but it would be like this

public_html/smf/Sources/  I think. Do I need to change all that in the backup also ?

Otsikko: Re: MySQL DB Transfer.
Kirjoitti: metallica48423 - lokakuu 13, 2007, 02:13:32 AP
the URL's are irrelevant to the DB, if the db imported, you can use repair_settings.php (What is repair_settings.php? (http://www.simplemachines.org/community/index.php?topic=18096.0)) to fix your files and db settings.
Otsikko: Re: MySQL DB Transfer.
Kirjoitti: Awesom - lokakuu 13, 2007, 02:19:23 AP
OK Well it still didn't work. the database name was originally like javaownz_zendurl1 I think and the new forums when I made database it is 7716_javaownz so I changed the zendurl one in the backup.txt to the 7716_javaownz (found all and replaced all) but it still has same error
Otsikko: Re: MySQL DB Transfer.
Kirjoitti: 青山 素子 - lokakuu 13, 2007, 12:01:41 IP
At the very top of the file add the following line:


USE databasename;


Replace "databasename" with the name of the database on your new host.