How to do mysql_upgrade for a particular database table
up vote
0
down vote
favorite
i am facing issue regarding mysql.user's table in mysql 5.6.36 server , previously my slave used to be on 5.6.22 version and we have taken a dump and migrated to new server , but due to version incompatibility we are unable to create new users , it is giving error to upgrade , is there anyway so that i can just upgrade only mysql.user table instead of running mysql_upgrade on entire slave databases.
ERROR :
Column count of mysql.user is wrong. Expected 43, found 42. Created with MySQL 50622, now running 50636. Please use mysql_upgrade to fix this error.
mysql
migrated from stackoverflow.com Nov 22 at 22:03
This question came from our site for professional and enthusiast programmers.
add a comment |
up vote
0
down vote
favorite
i am facing issue regarding mysql.user's table in mysql 5.6.36 server , previously my slave used to be on 5.6.22 version and we have taken a dump and migrated to new server , but due to version incompatibility we are unable to create new users , it is giving error to upgrade , is there anyway so that i can just upgrade only mysql.user table instead of running mysql_upgrade on entire slave databases.
ERROR :
Column count of mysql.user is wrong. Expected 43, found 42. Created with MySQL 50622, now running 50636. Please use mysql_upgrade to fix this error.
mysql
migrated from stackoverflow.com Nov 22 at 22:03
This question came from our site for professional and enthusiast programmers.
Have you read the documentation: dev.mysql.com/doc/refman/5.6/en/mysql-upgrade.html
– Bill Karwin
Nov 22 at 17:54
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
i am facing issue regarding mysql.user's table in mysql 5.6.36 server , previously my slave used to be on 5.6.22 version and we have taken a dump and migrated to new server , but due to version incompatibility we are unable to create new users , it is giving error to upgrade , is there anyway so that i can just upgrade only mysql.user table instead of running mysql_upgrade on entire slave databases.
ERROR :
Column count of mysql.user is wrong. Expected 43, found 42. Created with MySQL 50622, now running 50636. Please use mysql_upgrade to fix this error.
mysql
i am facing issue regarding mysql.user's table in mysql 5.6.36 server , previously my slave used to be on 5.6.22 version and we have taken a dump and migrated to new server , but due to version incompatibility we are unable to create new users , it is giving error to upgrade , is there anyway so that i can just upgrade only mysql.user table instead of running mysql_upgrade on entire slave databases.
ERROR :
Column count of mysql.user is wrong. Expected 43, found 42. Created with MySQL 50622, now running 50636. Please use mysql_upgrade to fix this error.
mysql
mysql
asked Nov 22 at 17:42
JABIR BAIG
83
83
migrated from stackoverflow.com Nov 22 at 22:03
This question came from our site for professional and enthusiast programmers.
migrated from stackoverflow.com Nov 22 at 22:03
This question came from our site for professional and enthusiast programmers.
Have you read the documentation: dev.mysql.com/doc/refman/5.6/en/mysql-upgrade.html
– Bill Karwin
Nov 22 at 17:54
add a comment |
Have you read the documentation: dev.mysql.com/doc/refman/5.6/en/mysql-upgrade.html
– Bill Karwin
Nov 22 at 17:54
Have you read the documentation: dev.mysql.com/doc/refman/5.6/en/mysql-upgrade.html
– Bill Karwin
Nov 22 at 17:54
Have you read the documentation: dev.mysql.com/doc/refman/5.6/en/mysql-upgrade.html
– Bill Karwin
Nov 22 at 17:54
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
You need to run mysql-upgrade --upgrade-system-tables
(See Documentation)
This will bypass checking all other tables and focus just on the mysql
schema.
add a comment |
up vote
0
down vote
I was able to upgrade only one table of my database this way : It worked for me. My scenario. MySQL 5.1 to 5.6 only I run into a problem upgrading one of my databases table (the biggest one), did not dump correctly and was rejected during upload to new server, took forever and timed out several times, so I had to do something out of the books. (Before you do download your database, do a complete backup, repair, check and all the maintenance required so you dont have messed up data in your new upload. Also, do a direct wire transfer, dont use wireless with large databases.
1 - All my tables, except the biggest one, uploaded without a problem (regular export then regular import thru phpmyadmin from 5.1 to 5.6 MySQL different servers side by side with my laptop in the middle)
2 - I went into the MySQL source data directory (depends on your system but on Centos 7 is in /var/lib/mysql/) and search the table with the problem, it has 3 files named after the table (table_name.MYD, table_name.MYI and table_name.FRM) you need to download those 3 manually thru FTP like Filezilla or copy into a USB)
3 - Just in case, create a target blank temp_database and give all the rights to a user. MySQL creates an additional directory called temp_database where you are to copy those 3 files for that table. (dont need to mess with good upgraded tables, if you need to do upload all the tables, you can proceed to copy all the tables files into that new temp directory, is faster when you do copy directly without using MySQL)
4 - Once you transfer the table files into that new target temp directory, then you will be able to see them on phpmyadmin (on the new server) as temp_database, check the table, make sure all data and records are there correctly, displayed and accounted for.
5 - Since we created a copy thru FTP or a USB plain copy, then obviously the file is READ ONLY, and performing a check or repair table it will tell you so. You need to do CHMOD thru shell on those files so MySQL can process the repair. I guess, while repairing the file, it does the repair and upgrade of table format or any other version problems.
6 - After you are happy with the table, and you can insert, update and delete one record as test, then you can just move that table or tables onto the right database using phpmyadmin to make everything work as usual. Remove that temp database and you are set.
I have only performed that in that scenario, 5.1 to 5.6 upgrade. I don't know if same procedure will work for other versions, havent tryied, but anyone reading this article, can follow my procedure and update us if it does work with other versions of MySQL or other databases such as MariaDB, let us know.
Hope it helps. Cheers.
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f223237%2fhow-to-do-mysql-upgrade-for-a-particular-database-table%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
You need to run mysql-upgrade --upgrade-system-tables
(See Documentation)
This will bypass checking all other tables and focus just on the mysql
schema.
add a comment |
up vote
0
down vote
You need to run mysql-upgrade --upgrade-system-tables
(See Documentation)
This will bypass checking all other tables and focus just on the mysql
schema.
add a comment |
up vote
0
down vote
up vote
0
down vote
You need to run mysql-upgrade --upgrade-system-tables
(See Documentation)
This will bypass checking all other tables and focus just on the mysql
schema.
You need to run mysql-upgrade --upgrade-system-tables
(See Documentation)
This will bypass checking all other tables and focus just on the mysql
schema.
answered Nov 22 at 22:04
RolandoMySQLDBA
140k24219370
140k24219370
add a comment |
add a comment |
up vote
0
down vote
I was able to upgrade only one table of my database this way : It worked for me. My scenario. MySQL 5.1 to 5.6 only I run into a problem upgrading one of my databases table (the biggest one), did not dump correctly and was rejected during upload to new server, took forever and timed out several times, so I had to do something out of the books. (Before you do download your database, do a complete backup, repair, check and all the maintenance required so you dont have messed up data in your new upload. Also, do a direct wire transfer, dont use wireless with large databases.
1 - All my tables, except the biggest one, uploaded without a problem (regular export then regular import thru phpmyadmin from 5.1 to 5.6 MySQL different servers side by side with my laptop in the middle)
2 - I went into the MySQL source data directory (depends on your system but on Centos 7 is in /var/lib/mysql/) and search the table with the problem, it has 3 files named after the table (table_name.MYD, table_name.MYI and table_name.FRM) you need to download those 3 manually thru FTP like Filezilla or copy into a USB)
3 - Just in case, create a target blank temp_database and give all the rights to a user. MySQL creates an additional directory called temp_database where you are to copy those 3 files for that table. (dont need to mess with good upgraded tables, if you need to do upload all the tables, you can proceed to copy all the tables files into that new temp directory, is faster when you do copy directly without using MySQL)
4 - Once you transfer the table files into that new target temp directory, then you will be able to see them on phpmyadmin (on the new server) as temp_database, check the table, make sure all data and records are there correctly, displayed and accounted for.
5 - Since we created a copy thru FTP or a USB plain copy, then obviously the file is READ ONLY, and performing a check or repair table it will tell you so. You need to do CHMOD thru shell on those files so MySQL can process the repair. I guess, while repairing the file, it does the repair and upgrade of table format or any other version problems.
6 - After you are happy with the table, and you can insert, update and delete one record as test, then you can just move that table or tables onto the right database using phpmyadmin to make everything work as usual. Remove that temp database and you are set.
I have only performed that in that scenario, 5.1 to 5.6 upgrade. I don't know if same procedure will work for other versions, havent tryied, but anyone reading this article, can follow my procedure and update us if it does work with other versions of MySQL or other databases such as MariaDB, let us know.
Hope it helps. Cheers.
New contributor
add a comment |
up vote
0
down vote
I was able to upgrade only one table of my database this way : It worked for me. My scenario. MySQL 5.1 to 5.6 only I run into a problem upgrading one of my databases table (the biggest one), did not dump correctly and was rejected during upload to new server, took forever and timed out several times, so I had to do something out of the books. (Before you do download your database, do a complete backup, repair, check and all the maintenance required so you dont have messed up data in your new upload. Also, do a direct wire transfer, dont use wireless with large databases.
1 - All my tables, except the biggest one, uploaded without a problem (regular export then regular import thru phpmyadmin from 5.1 to 5.6 MySQL different servers side by side with my laptop in the middle)
2 - I went into the MySQL source data directory (depends on your system but on Centos 7 is in /var/lib/mysql/) and search the table with the problem, it has 3 files named after the table (table_name.MYD, table_name.MYI and table_name.FRM) you need to download those 3 manually thru FTP like Filezilla or copy into a USB)
3 - Just in case, create a target blank temp_database and give all the rights to a user. MySQL creates an additional directory called temp_database where you are to copy those 3 files for that table. (dont need to mess with good upgraded tables, if you need to do upload all the tables, you can proceed to copy all the tables files into that new temp directory, is faster when you do copy directly without using MySQL)
4 - Once you transfer the table files into that new target temp directory, then you will be able to see them on phpmyadmin (on the new server) as temp_database, check the table, make sure all data and records are there correctly, displayed and accounted for.
5 - Since we created a copy thru FTP or a USB plain copy, then obviously the file is READ ONLY, and performing a check or repair table it will tell you so. You need to do CHMOD thru shell on those files so MySQL can process the repair. I guess, while repairing the file, it does the repair and upgrade of table format or any other version problems.
6 - After you are happy with the table, and you can insert, update and delete one record as test, then you can just move that table or tables onto the right database using phpmyadmin to make everything work as usual. Remove that temp database and you are set.
I have only performed that in that scenario, 5.1 to 5.6 upgrade. I don't know if same procedure will work for other versions, havent tryied, but anyone reading this article, can follow my procedure and update us if it does work with other versions of MySQL or other databases such as MariaDB, let us know.
Hope it helps. Cheers.
New contributor
add a comment |
up vote
0
down vote
up vote
0
down vote
I was able to upgrade only one table of my database this way : It worked for me. My scenario. MySQL 5.1 to 5.6 only I run into a problem upgrading one of my databases table (the biggest one), did not dump correctly and was rejected during upload to new server, took forever and timed out several times, so I had to do something out of the books. (Before you do download your database, do a complete backup, repair, check and all the maintenance required so you dont have messed up data in your new upload. Also, do a direct wire transfer, dont use wireless with large databases.
1 - All my tables, except the biggest one, uploaded without a problem (regular export then regular import thru phpmyadmin from 5.1 to 5.6 MySQL different servers side by side with my laptop in the middle)
2 - I went into the MySQL source data directory (depends on your system but on Centos 7 is in /var/lib/mysql/) and search the table with the problem, it has 3 files named after the table (table_name.MYD, table_name.MYI and table_name.FRM) you need to download those 3 manually thru FTP like Filezilla or copy into a USB)
3 - Just in case, create a target blank temp_database and give all the rights to a user. MySQL creates an additional directory called temp_database where you are to copy those 3 files for that table. (dont need to mess with good upgraded tables, if you need to do upload all the tables, you can proceed to copy all the tables files into that new temp directory, is faster when you do copy directly without using MySQL)
4 - Once you transfer the table files into that new target temp directory, then you will be able to see them on phpmyadmin (on the new server) as temp_database, check the table, make sure all data and records are there correctly, displayed and accounted for.
5 - Since we created a copy thru FTP or a USB plain copy, then obviously the file is READ ONLY, and performing a check or repair table it will tell you so. You need to do CHMOD thru shell on those files so MySQL can process the repair. I guess, while repairing the file, it does the repair and upgrade of table format or any other version problems.
6 - After you are happy with the table, and you can insert, update and delete one record as test, then you can just move that table or tables onto the right database using phpmyadmin to make everything work as usual. Remove that temp database and you are set.
I have only performed that in that scenario, 5.1 to 5.6 upgrade. I don't know if same procedure will work for other versions, havent tryied, but anyone reading this article, can follow my procedure and update us if it does work with other versions of MySQL or other databases such as MariaDB, let us know.
Hope it helps. Cheers.
New contributor
I was able to upgrade only one table of my database this way : It worked for me. My scenario. MySQL 5.1 to 5.6 only I run into a problem upgrading one of my databases table (the biggest one), did not dump correctly and was rejected during upload to new server, took forever and timed out several times, so I had to do something out of the books. (Before you do download your database, do a complete backup, repair, check and all the maintenance required so you dont have messed up data in your new upload. Also, do a direct wire transfer, dont use wireless with large databases.
1 - All my tables, except the biggest one, uploaded without a problem (regular export then regular import thru phpmyadmin from 5.1 to 5.6 MySQL different servers side by side with my laptop in the middle)
2 - I went into the MySQL source data directory (depends on your system but on Centos 7 is in /var/lib/mysql/) and search the table with the problem, it has 3 files named after the table (table_name.MYD, table_name.MYI and table_name.FRM) you need to download those 3 manually thru FTP like Filezilla or copy into a USB)
3 - Just in case, create a target blank temp_database and give all the rights to a user. MySQL creates an additional directory called temp_database where you are to copy those 3 files for that table. (dont need to mess with good upgraded tables, if you need to do upload all the tables, you can proceed to copy all the tables files into that new temp directory, is faster when you do copy directly without using MySQL)
4 - Once you transfer the table files into that new target temp directory, then you will be able to see them on phpmyadmin (on the new server) as temp_database, check the table, make sure all data and records are there correctly, displayed and accounted for.
5 - Since we created a copy thru FTP or a USB plain copy, then obviously the file is READ ONLY, and performing a check or repair table it will tell you so. You need to do CHMOD thru shell on those files so MySQL can process the repair. I guess, while repairing the file, it does the repair and upgrade of table format or any other version problems.
6 - After you are happy with the table, and you can insert, update and delete one record as test, then you can just move that table or tables onto the right database using phpmyadmin to make everything work as usual. Remove that temp database and you are set.
I have only performed that in that scenario, 5.1 to 5.6 upgrade. I don't know if same procedure will work for other versions, havent tryied, but anyone reading this article, can follow my procedure and update us if it does work with other versions of MySQL or other databases such as MariaDB, let us know.
Hope it helps. Cheers.
New contributor
edited Dec 8 at 2:04
New contributor
answered Dec 8 at 0:57
Luis H Cabrejo
12
12
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Database Administrators Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f223237%2fhow-to-do-mysql-upgrade-for-a-particular-database-table%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have you read the documentation: dev.mysql.com/doc/refman/5.6/en/mysql-upgrade.html
– Bill Karwin
Nov 22 at 17:54