We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

MySQL 5.0.19 > MySQL 4.1.18  How to downgrade?

mrzsilva
mrzsilva asked
on
Medium Priority
589 Views
Last Modified: 2012-05-05
Hello
I have update MySQL a few days ago in a linux server (CentOS) to MySQL 5.0.19 but since that update im having a lot of compatibility problems with some scripts, so i will have to downgrade back to MySQL 4.1.18, i have been searching in the web and made a full server databases dump using the command mysqldump --all-databases --compatible=mysql40 -u[admin_user] -p[password] -hlocalhost > full_backup.sql
But now im "lost" in how to restore de backup back to the server after the MySQL 4.1.18 installation, could you please provide me the steps to do it?
Thanks
Comment
Watch Question

Commented:
The full dump you made you just need to excute the sql file in Mysql4.1, it should be as simple as typying "mysql ./full_backup.sql".

Author

Commented:
okay, gona try it tonight.
Thanks

Author

Commented:
mysql ./full_backup.sql
ERROR 1102 (42000): Incorrect database name './full_backup.sql'

What could be the problem?

Commented:
My bad, I got confused there for a second, it should be "mysql < full_backup.sql", of course you have to enter the proper syntax for username and password I think, like this "mysql -u USER -p DBNAME < full_dump.sql". That should work.

Author

Commented:
mysql -u USER -p DBNAME < full_dump.sql the DBNAME aplies for full restore?

Commented:
No I guess you don't need the DBNAME just a user with proper access.

Author

Commented:
ok so what i need to do is run the comand "mysql -u[username] -p[password] < full_dump.sql" Right?

Commented:
yes, that should do it.

Author

Commented:
After making a dump of the mysql5 databases do i need to make the "drop" of the databases content or in the import process will be that data droped?
Thanks
Commented:
You have to do the import first then drop the remaining tables you don't want. If you try to drop the tables before you import you will lose all the usernames and permiisions associated with the mysql service. This will make it impossible to do a import. If you still have the MySQL 5 databses I would suggest dumping each databsse seperately then re adding them, this will allow you to transition with much less effort.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.