808smokey Posted June 4, 2004 Share Posted June 4, 2004 Hi, I can't restore the backup SQL from cpanel. It says it's disabled?? So how do I restore my Files?? I can add my SQL file, click restore, it loads a screen that has an "upload" arrow and say restoring. But's that all it does? It sits there stupid and nothing happens. So how do I restore this?? I have no idea how to do it in phpmyadmin (actually how I messed it up :D , I've been reading for a while on it and it doesn't make sense to me :( Thanks for the help Link to comment Share on other sites More sharing options...
peterr Posted June 4, 2004 Share Posted June 4, 2004 Hi, Using phpmyadmin, there is, I think from memory, an IMPORT tab, use that, browse for the file, press the GO button. That's all from memory though and I'm an old man who forgets whether he has had breakfast or not. :D Peter Link to comment Share on other sites More sharing options...
ayn Posted June 4, 2004 Share Posted June 4, 2004 do you have shell access? just delete everything in the database, and do "mysql database < backup-file.sql", or "mysql -u username -p database < backup-file.sql". --AYN Link to comment Share on other sites More sharing options...
808smokey Posted June 6, 2004 Author Share Posted June 6, 2004 When I go to Import it says "It's done but with errors in the bottom of the window??? I can type in the file I want to imprt but when I hit "GO" nothing happens. I still can't figure out this: "mysql database < backup-file.sql", or "mysql -u username -p database < backup-file.sql".I went to the phpmyadmin site and the so called help isn't very helpful :( Link to comment Share on other sites More sharing options...
ozcsys Posted June 6, 2004 Share Posted June 6, 2004 Hi, I can't restore the backup SQL from cpanel. It says it's disabled?? So how do I restore my Files?? I can add my SQL file, click restore, it loads a screen that has an "upload" arrow and say restoring. But's that all it does? It sits there stupid and nothing happens. So how do I restore this?? I have no idea how to do it in phpmyadmin (actually how I messed it up :D , I've been reading for a while on it and it doesn't make sense to me :( Thanks for the help What kind of backup is it? If it is a regular sql file you should be able to do the following. In phpmyadmin go to the sql tab then browse to the file on your local computer and click on go and it should restore your database. The Knowledge Base is a wonderful thing. Do you have a problem? Have you checked out Common Problems? There are many very useful osC Contributions Are you having trouble with a installed contribution? Have you checked out the support thread found Here BACKUP BACKUP BACKUP!!! You did backup, right?? Link to comment Share on other sites More sharing options...
Guest Posted June 6, 2004 Share Posted June 6, 2004 it may be wise to go to phpmyadmin web site and go through the tutorial, install it locally on your system and play with it, then you can do it on your web server. or hire someone to do it for u, should only take about 15 minutes max for them to be able to tie into your system, deal with the files, check them. Link to comment Share on other sites More sharing options...
808smokey Posted June 6, 2004 Author Share Posted June 6, 2004 Regardless of tutorials the friggin window won't work. I click "GO" till my mouse breaks and it WILL NOT WORK. So how the H3ll am I supposed to import a file, ANY FILE, if the window doesn't work??? I turned of Zonealarm and set IE to accept/allow anything the net will do and it DOES NOT WORK. PIECE CRAP PROGRAM Link to comment Share on other sites More sharing options...
peterr Posted June 6, 2004 Share Posted June 6, 2004 Hi, Using phpMyAdmin 2.5.6-rc1 1. Top left hand dropdown box, (just under "Home"), select the database you want to use. 2. You should now see 4 tabs: Structure SQL Export Search Query 3. Click the SQL tab 4. Use the BROWSE button to select the local (SQL) file (i.e. the one on your computer). 5 Press the GO button That's it. :) Peter Link to comment Share on other sites More sharing options...
peterr Posted June 7, 2004 Share Posted June 7, 2004 Hi, If, for some strange reason,phpMyAdmin isn't working for you (talk to your hosting company), then you can use the file /catalog/install/templates/pages/install_3.php as an example of how to use PHP to load it. Lines 35 to 47 are probably all that you would need, with some mods of course to add the db name, username, and filename (SQL filename). <?php $db = array(); $db['DB_SERVER'] = trim(stripslashes($HTTP_POST_VARS['DB_SERVER'])); $db['DB_SERVER_USERNAME'] = trim(stripslashes($HTTP_POST_VARS['DB_SERVER_USERNAME'])); $db['DB_SERVER_PASSWORD'] = trim(stripslashes($HTTP_POST_VARS['DB_SERVER_PASSWORD'])); $db['DB_DATABASE'] = trim(stripslashes($HTTP_POST_VARS['DB_DATABASE'])); osc_db_connect($db['DB_SERVER'], $db['DB_SERVER_USERNAME'], $db['DB_SERVER_PASSWORD']); $db_error = false; $sql_file = $dir_fs_www_root . 'install/oscommerce.sql'; osc_set_time_limit(0); osc_db_install($db['DB_DATABASE'], $sql_file); if ($db_error != false) { echo $db_error; } ?> There are many ways to skin a cat. :) Peter Link to comment Share on other sites More sharing options...
808smokey Posted June 7, 2004 Author Share Posted June 7, 2004 Thanks for the help everyone, I was really frustrated with this. It's my fault I didn't backup more often, last time was 3 weeks ago. I had lost over 150 new items and changes to the site. But... I got it to work through phpmyadmin. Just so everyone knows if they have this problem, PHPMyadmin won't work. You have to open internet explorer, click tools, internet options, advanced tab then scroll down to Microsoft VM and enable all 3 Jave options. If you don't the Java window (Query Window in PHP) won't work properly which is what happened to me. Thanks Link to comment Share on other sites More sharing options...
peterr Posted June 7, 2004 Share Posted June 7, 2004 Hi, Good to hear your problem is solved; so it was a browser problem, not a problem with phpMyAdmin. :D I'd suggest you use a better browser, one that doesn't have the security holes and other flaws that IE has. Of interest was a recent article from Sitepoint, a well known forum for webmasters. Due to the stagnation of Internet Explorer , all the ultra-keen Web developers who would normally jump on a technology like this have moved to Mozilla (and Firefox) as their development platform of choice. To put it bluntly, no one really cares what Internet Explorer can do now, because there is so much that it can't do (like properly support CSS2). Peter Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.