Link to home
Start Free TrialLog in
Avatar of AJNS
AJNS

asked on

Import mysql database without a dump file

We have an old web server that was decommissioned and has been gathering dust. It had a mysql database on it which we now want access to. The server will not run but I have the entire mysql directory.

I installed mysql on a test server and would like to import the database but I don't know how. How would I go about doing that. I've imported from dump files before but I don't know how to do it with the raw files.
Avatar of coolbloke1324
coolbloke1324

You should be able to copy the data directory from one server to another and then start the new server and the files will simply be read. Does this work for you?
Avatar of AJNS

ASKER

I tried that but it gave me errors that files couldn't be found. I checked the .ini file it was calling and it points to a file structure from the old server.

I tired to recreate it but it always gave me the error. That's why I was hoping there was some way to import.
ASKER CERTIFIED SOLUTION
Avatar of coolbloke1324
coolbloke1324

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AJNS

ASKER

ok, i'll try that right now.
I would also run the mysql_update utility against it to update the tables to the
proper structure associated with the new MySQL.
I think wolfgang_93 has an excellent point... worth doing that too. Did those steps work for you?
Avatar of AJNS

ASKER

I did the above and the sql service started. I am using SQL Manager 2010 to access it and I can bring up one of the databases but not the others.

In my data directory there are several folders, one called test and several others that I need, each one being a database. When I register the databases in SQL Manager it only finds the "test" database, not the others. I'm not sure what I need to do to access them.

I can type the alias in for the database and it creates a shortcut but there is not data there, it's not actually seeing it.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AJNS

ASKER

wolfgang 93 - I was using the register database but it wasn't working. It wouldn't find the databases so after reading your post I looked up using the mysql utility and easily used it at the command line to import the databases. I was then able to register and use them in sql manager.

coolbloke1324 - your suggestion for copying just the data folder was right on the mark.

Thanks for the help