Nov 23, 2008 | 05:59 AM  
Welcome

Don't have an account yet? You can create one, it is free, just click here

as a registered user you have some advantages like free downloads, comments and posting on our forums, depending upon this site's configuration and options.

 • •  Control Panel - Register - Login  • • 
Current Stable MDPro Lite 1.0821 Download
  Forum FAQForum FAQ   SearchSearch  UsergroupsUsergroups  PreferencesPreferences  Options forumOptions forum  Watched TopicsWatched Topics  Watched ForumsWatched Forums
Latest forum posts Latest forum posts  Log in to check your private messages Log in to check your private messages    Log inLog in 
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
cbradley
MD user level 5
MD user level 5


Joined: July 21, 2005
Posts: 59

Member
Post  Posted: Sep 20, 2005 - 11:03 AM Reply with quote Back to top
Post subject: Restoring MySQL database

Hi

Can anyone tell me where I can find a real idiot's step-by-step guide to restoring my database from a .sql file saved using the MySQL utility in MD-Pro, and/or to transfer the saved data to a new database? Hardly needs saying, but this is new territory for me.


I saved the db before upgrading to 1.0.74 but something went wrong so I restored the full previous version. I now get a 'session initalisation failed' message. I tried to reset the session table using mdsos, but that tells me there is a syntax error in MySQL.


I did manage to install a full version of 1.0.74 to a new db, so an alternative would be to transfer the old tables to the new database. I just don't know how to do that without editing each one manually with phpMyAdmin - and I have other plans for the rest of my life.

Chris
View user's profile
PeteBest
MD user level 5
MD user level 5


Joined: Oct 06, 2003
Posts: 4845

bannato
Post  Posted: Sep 20, 2005 - 11:17 AM Reply with quote Back to top

'session initalisation failed' can mean you've got the wrong database details, or your database is empty.


To restore a backup made from MySQL_Tools follow these steps.

Open phpmyadmin and select your database
Follow the sql link from the tab in the main frame
Browse to the location of the file on your HDD and hit go


That's it. The .sql file drops the existing tabes, but if you want to you could remove them yourself. After that you'll need to edit \config\md-config.php with your database details if you're moving to another host/database

_________________
Retired from official MAXdev duties
View user's profile
cbradley
MD user level 5
MD user level 5


Joined: July 21, 2005
Posts: 59

bannato
Post  Posted: Sep 20, 2005 - 11:43 AM Reply with quote Back to top

Thanks Pete, a huge step forward in knowledge for me.

The old installation still won't work even having checked md-config.php agaisnt the saved version, but at least I know now I can install the latest release with a new db and transfer the data.

Great support.
View user's profile
alex-19841
MD user level 2
MD user level 2


Joined: Dec 29, 2005
Posts: 25

bannato
Post  Posted: Dec 29, 2005 - 11:39 AM Reply with quote Back to top

After restoring SQL, would it restore all posts?
View user's profile
PeteBest
MD user level 5
MD user level 5


Joined: Oct 06, 2003
Posts: 4845

bannato
Post  Posted: Dec 29, 2005 - 11:46 AM Reply with quote Back to top

alex-19841 wrote:
After restoring SQL, would it restore all posts?



Not quite sure on your meaning of posts, but yes all your content on your site is stored in the database

_________________
Retired from official MAXdev duties
View user's profile
sjrw
MD user level 2
MD user level 2


Joined: Apr 14, 2006
Posts: 23

bannato
Post  Posted: July 06, 2007 - 06:48 PM Reply with quote Back to top

I just followed these instructions - used phpmyadmin to restore the backup sql file - and now it wont work at all.

http://www.sunflowertherapies.net

help

heres what it said

Error
SQL query:

CREATE TABLE `sun__blocks` (

pn_bid int( 11 ) unsigned NOT NULL AUTO_INCREMENT ,
pn_bkey varchar( 255 ) NOT NULL ,
pn_title varchar( 255 ) NOT NULL ,
pn_content text NOT NULL ,
pn_url varchar( 255 ) NOT NULL ,
pn_mid int( 11 ) unsigned DEFAULT '0' NOT NULL ,
pn_position varchar( 255 ) DEFAULT 'l' NOT NULL ,
pn_weight decimal( 10, 1 ) DEFAULT '0.0' NOT NULL ,
pn_active tinyint( 3 ) unsigned DEFAULT '1' NOT NULL ,
pn_refresh int( 11 ) unsigned DEFAULT '0' NOT NULL ,
pn_last_update timestamp DEFAULT 'CURRENT_TIMESTAMP',
pn_language varchar( 30 ) NOT NULL ,
allow_gids varchar( 255 ) DEFAULT 'A' NOT NULL ,
PRIMARY KEY ( pn_bid )
);



MySQL said:

#1067 - Invalid default value for 'pn_last_update'
View user's profile
sjrw
MD user level 2
MD user level 2


Joined: Apr 14, 2006
Posts: 23

bannato
Post  Posted: July 07, 2007 - 02:36 AM Reply with quote Back to top

This is what happens when I try to access the site
Please help

Fatal error: Call to a member function on a non-object in C:\wamp\www\modules\AutoTheme\includes\md-pro\atAPI.php on line 238
View user's profile
Display posts from previous:     
Jump to:  
All times are GMT + 13 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by MDForum 2.0.8© 2003-2007 MAXdev Team
Credits