MySql migration problem - urgent


So far I used MySql 5.1 for Windows and if I wanted to migrate the whole database to another computer I did this:
- installed a MySql 5.1 on the new computer (yes I know I can install  from command line too)
- Stopped the server
- copied the old ibdata1 file and all the database folders from the old computer the the new one (data folder)
- Restarted the server and everything was fine

Today I installed 5.5 and I wanted to migrate the old 5.1 data and I wanted to repeat the whole process and to my greatest surprise there wasn't ibdata1 nor the log files in the data folder.

What can I do then? I have about 150 databases (it's a developer machine) so I don't want to export the Sql-s one by one.

Thank you
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chakravarthi AyyalaDatabase AdministratorCommented:
If the first time migrated MySQL on 5.1 was running, did you check the location of data folder from my.cnf?
starhuAuthor Commented:
I haven't got my.cnf, I have my.ini.

Before installing MySql 5.5 there wasn't MySql on that computer at all (the 5.1 was on another computer)
Chakravarthi AyyalaDatabase AdministratorCommented:
So do you "datadir" in that file?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

starhuAuthor Commented:
It was set to:
datadir="C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.5/Data/"
however at intall I set the installation directory (C:\MySql5).

I corrected the path, restarted the service.
Now I can see all the databases and tables but the stored procedures and views are not there.

How can I migrate them too, by copying? Where are they stored?
Chakravarthi AyyalaDatabase AdministratorCommented:
What is the output of the following query?

    WHERE ROUTINE_SCHEMA=<'dbname'>;
Chakravarthi AyyalaDatabase AdministratorCommented:
To add, replace the dbname with the dbname you are interested in.
starhuAuthor Commented:
the query result is empty for all databases.
Can I insert (do I have rights) into NFORMATION_SCHEMA.ROUTINES?
starhuAuthor Commented:
I exported all the routines from the old database and I wanted to insert into the new one but I got
"Access denied for user 'root'@'localhost' to database 'information_schema'"
Chakravarthi AyyalaDatabase AdministratorCommented:
information_schema doesn't really exist as a physical database. Rather it is a collection of views of data.
Hence, i doubt inserting data into information_Schema.

starhuAuthor Commented:
It didn't solve my problem because the stored procedures were not in the new database - I needed to downgrade to 5.0 so as to import all the data and stored procedures
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.