Create/upload which first: MySQL database or SMF software to new forum?

Started by glam, April 18, 2008, 10:22:38 AM

Previous topic - Next topic

glam

[Not sure if this is the right board for this question. If not, admins, please move it.]

I'm about to start a new forum. I received the temporary IP, and while I wait for the new domain to propagate, I have access to the cPanel (file manager, MySQL, phpMyAdmin, etc.)

I used FTP to upload SMF 1.1.4 to /public_html/forum but now I wonder if I should have created the MySQL database and db user first. If I did not, does it matter?

I created the db after I uploaded SMF, and my next steps are to upload a backup of the data from the former forum (which I did not create but ended up an admin when the other one left).

Am I going about this backwards?


Kindred

no. what you've done is fine....  the smf files don't do anything without a database...   and if you are restoring another site's db, you'll have to manually set your Settings.php to access the  restored DB anyway.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

glam


Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

glam

OK, thanks, Kindred.

So far, so good. I didn't realize the SMF installed would create my database for me.

Kindred

it won't.

To install SMF, you must have a database set up and waiting for the forum.
However, copying the files is not installing SMF, you have to run install.php.

However... if you are restoring a previous forum, then DON'T run install.php.
Copy all the SMF files.
delete install.php and the .sql files.
import your previous forum's SQL backup into your database
edit Settings.php to point to your (new) database
run repair_settings.php to correctly set the paths and urls.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

glam

Quote from: Kindred on April 18, 2008, 12:21:10 PM
To install SMF, you must have a database set up and waiting for the forum.

Did that.

When the SMF installer asked for my database (indicating it would try to create one for me), I pointed it to the the db I had created just moments earlier.

QuoteHowever, copying the files is not installing SMF, you have to run install.php.

However... if you are restoring a previous forum, then DON'T run install.php.

Too late. :(  I can already see our new empty forum after registering Webmaster.

QuoteCopy all the SMF files.
delete install.php and the .sql files.
import your previous forum's SQL backup into your database
edit Settings.php to point to your (new) database
run repair_settings.php to correctly set the paths and urls.

Even though I goofed, I think the mess is minimal. I no longer see install.php (SMF installer deleted it), and I don't see any .sql files, either.

Here's what I have right now (click to enlarge);



Does anything jump out at you before I proceed?

And thanks. I looked on the forum for configuration steps (e.g., from a previous forum), but I couldn't find anything -- probably because I didn't dig deep enough. This is one BUSY forum!

glam

I have never imported a database using phpMyAdmin. Our host installed the only backup we ever needed.

I just searched this forum for +restore +database but didn't get any useful returns.

I have done plenty of db backups using the following procedure:

1.  Open cPanel.
2.  Click PHPMyAdmin under Manage Site.
3.  Click EXPORT.
4.  Click SQL button.
5.  Under SQL options pane:
     a. Select MYSQL40 from drop-down list under SQL export compatibility.
     b. Check Add DROP DATABASE.
     c. Check Structure.
     d. Check Add DROP TABLE.
     e. Check Add IF NOT EXISTS.
     f. Check Add AUTO_INCREMENT value.
     g. Check  Enclose table and field names with back quotes.
     h. Check Data.
     i. Check Complete inserts.
     j. Check Use hexadecimal type for binary inserts.
6.  Select INSERT from the Export Type drop-down list.
7.  Check Save as file.

I assume I click the database into which I want the data to go (rather than at the root) and then click IMPORT from the tabs at the top.

Then what?



When I click IMPORT, it wants a text file. Should this just be one flat .sql file?  What I have is a 426 MB compressed file named backup-mydomain.com-4-12-2008.tar.gz

rsw686

Your fine. Just replace the database with your backup from the other site. Then run repair_settings.php.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

rsw686

Quote from: glam on April 18, 2008, 12:54:44 PM



When I click IMPORT, it wants a text file. Should this just be one flat .sql file?  What I have is a 426 MB compressed file named backup-mydomain.com-4-12-2008.tar.gz


That is not going to work. Look at the max file size in the screenshot. Besides the file size you'll probably hit the script time out. Look at using mysqldumper which is ideal for large databases.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

glam

Quote from: rsw686 on April 18, 2008, 12:56:29 PM
That is not going to work. Look at the max file size in the screenshot. Besides the file size you'll probably hit the script time out. Look at using mysqldumper which is ideal for large databases.

Oh! Didn't see the file size limit.

I have another backup from around the same time that is only 31 MB. I wish I remember what settings I used, but I think the big one includes all the metadata from all three databases at the old site, while the smaller file contains just the content from the forum.

I can always upload and see what happens since no one is on the new forum but me. Or am I just asking for big trouble?

*Not [yet] a database person at all, but got stuck with it for this new forum*

glam

Noob alert: Can I import a .gz file or do I need to extract it and import it as .sql?

Never mind. Noob needs to look more closely at the phpMyAdmin interface.

QuoteImported file compression will be automatically detected from: None, gzip, zip

Advertisement: