News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Preparing asandbox database

Started by MensaMod, November 24, 2014, 07:08:34 PM

Previous topic - Next topic

MensaMod

Hello again.

As I posted earlier, I'm building a sandbox copy of our SMF 1.1.19 system in prep for upgrading it (and then the live one) to 2.0.9.  So far I've got a clean \public_html\sandbox directory and loaded it from a cPanel backup of the home directory.  I used cPanel to create a new MySQL database, m2madmin_sandbox_ipb with one user, m2madmin_sbforum. 

Question 1 -- I've looked through what I think are the relevant portions of the SMF manual but haven't found any kind of step-by-step instructions for loading that database from the cPanel-generated backup of my live database.  Where can I find such a thing?

I wanted to avoid having any effect on my live database so I went ahead to use \sandbox\repair_settings.php to update the local database settings to match what I'd just created.  When I hit the Save button I got these messages:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/m2madmin/public_html/sandbox/public_html/repair_settings.php on line 391

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/m2madmin/public_html/sandbox/public_html/repair_settings.php on line 393

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/m2madmin/public_html/sandbox/public_html/repair_settings.php on line 408

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/m2madmin/public_html/sandbox/public_html/repair_settings.php on line 410


Question 2 - Is this something I should worry about?  If so, what can/should I do about it before going any further?

Thanks.

Sir Osis of Liver

Edit Settings.php in your sandbox install manually, it's in the forum root, to the new database credentials.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

MensaMod

Actually, the repair_settings.php seems to have taken care of the credentials just fine.  The problem is that there's nothing (except the one user ID) in that database yet.  But I did just accidentally found this item in the manual: How do I restore the database data.  I'll try those gyrations tomorrow morning.  <sound of crossing fingers>

BTW, I like your avatar, but I came this close to swatting that little critter and breaking my screen.

Kindred

Yes, that would be a problem...   The forum assumes that the database will have actual information, in the proper format.    Technically, you should have filled the database before running repair settings.
Сл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."

MensaMod

For Those Who Come After (who are as ignorant of the cPanel environment as I am)...

Situation: I've got a live database forbish_ipb and I want to build a sandbox image.  In cPanel, under Databases, select phpMyAdmin.  Once in, you'll see on the left-hand side a navigation tree.  Expand the bottom entry on the tree and you'll see the name of the live database.  Click on it.  The next display will be a long list of the database's tablenames, but across the top of the list is a row of tabs.  Click on the one that says Operations.   On the next display, one of the operations is Copy database to....  Enter the name of your sandbox database (say, forbish_sandbox_ipb), check or uncheck the following options that make sense, click on the Go button, and walk down to refill your coffee cup.  When you get back, it's done.

But it's good to take offsite backups, too.

MensaMod

Umm...  But that didn't quite resolve the issue (another noob toe-stub).  When I re-ran the repair_settings.php tool, I stupidly assigned the sandbox stuff a new $db_prefix.  Things were still broke, until I ran it again with the same prefix that was used for the live database.  Looks much better now.

ziycon

Is this all resolved now or do you require further assistance?

MensaMod



Yup, we're good, so far.  My folks are playing with the clone for a while, then I'll go ahead with the upgrade over there.  If I run into anything else I'll open a separate note.

Thanks for the help, folks.


Advertisement: