[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

MySQL 5.0.19 > MySQL 4.1.18  How to downgrade?

Posted on 2006-04-04
10
Medium Priority
?
542 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
0
Comment
Question by:mrzsilva
  • 5
  • 5
10 Comments
 
LVL 4

Expert Comment

by:kamichie
ID: 16372643
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".
0
 

Author Comment

by:mrzsilva
ID: 16372675
okay, gona try it tonight.
Thanks
0
 

Author Comment

by:mrzsilva
ID: 16375360
mysql ./full_backup.sql
ERROR 1102 (42000): Incorrect database name './full_backup.sql'

What could be the problem?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:kamichie
ID: 16382162
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.
0
 

Author Comment

by:mrzsilva
ID: 16382589
mysql -u USER -p DBNAME < full_dump.sql the DBNAME aplies for full restore?
0
 
LVL 4

Expert Comment

by:kamichie
ID: 16382616
No I guess you don't need the DBNAME just a user with proper access.
0
 

Author Comment

by:mrzsilva
ID: 16382628
ok so what i need to do is run the comand "mysql -u[username] -p[password] < full_dump.sql" Right?
0
 
LVL 4

Expert Comment

by:kamichie
ID: 16382753
yes, that should do it.
0
 

Author Comment

by:mrzsilva
ID: 16384256
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
0
 
LVL 4

Accepted Solution

by:
kamichie earned 500 total points
ID: 16385086
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.
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question