import db
Posted by: peterc46 (---.lv.lv.cox.net)
Date: April 20, 2012 12:51AM

I had been using an older version of WS that had MySQL 5.1.36. A couple of days ago I did the (probably) dumb thing of downloading and installing the latest version of WS. My old databases are no longer available - they are in C:/wamp/bin/mysql.mysql5.1.36/data, but WS wants to use C:/wamp/bin/mysql/mysql5.5.20/data.

Is there a simple way to import the old db files? I have noticed that the old ibdata file is 10MB and the new one is 18MB.

Options: ReplyQuote
Re: import db
Posted by: RiggsFolly (---.as13285.net)
Date: April 20, 2012 04:02AM

If you are using MYISAM the ibdata file is irelevant. Its ised for INNODB databases.

The safest thing would be to do a backup of the old database and a restore on the new version.

However you may get away with this.

If you use MYISAM there should be a folder under the ...../data folder for each database you created.

Go to phpMyAdmin and create the database you want to have under the new mysql version, that will create the folder and put a file in there.
Add in your userid/passwords to the access system.

Then copy ( copy dont move just in case this does not work first time ) all the .frm, .MYI and .MYD files into the new ..../data folder.

You should see a database with all your tables.

I would do a repair on each table just to be on the safe side.


PS Not guarantee's the 2 versions of mysql are a fair ways apart, but you might get lucky.

Alternatively download the 5.1.36 version of mysql as well from the addons section of the home page. You can install more than one version of each component and switch between them.
Then do the backup and restore.

Options: ReplyQuote
Re: import db
Posted by: peterc46 (---.lv.lv.cox.net)
Date: April 20, 2012 08:21PM

Thanks for that, RiggsFolly. The db that I'm most concerned about is INNODB. Installing the 5.1.36 version of mysql restored access, or at least got me further than I was getting before, but a new glitch has been revealed. I suspect that the password fields in the db may have got screwed up.

The db is a recipe storage and retrieval utility, accessed via an html/php site. When starting the site I get the message:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'test'@'localhost' (using password: YES) in C:\wamp\www\recipe\main.inc.php on line 3

The first 3 lines of main.inc.php are:
1) <?php
2)
3) $con = mysql_connect("localhost", "test", "test"winking smiley or die('Sorry, could not connect to server');

[The smiley face is not mine, that should be a ), it is when it leaves here!]

I last accessed this site (which is purely local, on my PC). about 3 months ago, it was working ok, so the username/password test/test should be good.

Options: ReplyQuote
Re: import db
Posted by: stevenmartin99 (Moderator)
Date: April 20, 2012 08:28PM

if you want ill take a look using teamviewer?

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: import db
Posted by: peterc46 (---.lv.lv.cox.net)
Date: April 21, 2012 12:06AM

Found and fixed the problem. I am guessing that installing the latest version of WS wiped out the user I had added to access my databases. I recreated that user, set the privileges, and all is well again.

Thanks Steve for the help offer.

~PC

Options: ReplyQuote


Sorry, only registered users may post in this forum.