May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

mysqlcheck

[root@clusterserver1 software]# mysqlcheck mysql -uroot -p
Enter password:
mysql.columns_priv
error : Table upgrade required. Please do “REPAIR TABLE `columns_priv`” or dump/reload to fix it!
mysql.db OK
mysql.event
error : Table upgrade required. Please do “REPAIR TABLE `event`” or dump/reload to fix it!
mysql.func OK
mysql.general_log
error : Table upgrade required. Please do “REPAIR TABLE `general_log`” or dump/reload to fix it!
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc
error : Table upgrade required. Please do “REPAIR TABLE `proc`” or dump/reload to fix it!
mysql.procs_priv
error : Table upgrade required. Please do “REPAIR TABLE `procs_priv`” or dump/reload to fix it!
mysql.proxies_priv
error : Table upgrade required. Please do “REPAIR TABLE `proxies_priv`” or dump/reload to fix it!
mysql.servers OK
mysql.slow_log
error : Table upgrade required. Please do “REPAIR TABLE `slow_log`” or dump/reload to fix it!
mysql.tables_priv
error : Table upgrade required. Please do “REPAIR TABLE `tables_priv`” or dump/reload to fix it!
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
[root@clusterserver1 software]# mysqlcheck mysql -uroot -p
Enter password:
mysql.columns_priv
error : Table upgrade required. Please do “REPAIR TABLE `columns_priv`” or dump/reload to fix it!
mysql.db OK
mysql.event
error : Table upgrade required. Please do “REPAIR TABLE `event`” or dump/reload to fix it!
mysql.func OK
mysql.general_log
error : Table upgrade required. Please do “REPAIR TABLE `general_log`” or dump/reload to fix it!
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc
error : Table upgrade required. Please do “REPAIR TABLE `proc`” or dump/reload to fix it!
mysql.procs_priv
error : Table upgrade required. Please do “REPAIR TABLE `procs_priv`” or dump/reload to fix it!
mysql.proxies_priv
error : Table upgrade required. Please do “REPAIR TABLE `proxies_priv`” or dump/reload to fix it!
mysql.servers OK
mysql.slow_log
error : Table upgrade required. Please do “REPAIR TABLE `slow_log`” or dump/reload to fix it!
mysql.tables_priv
error : Table upgrade required. Please do “REPAIR TABLE `tables_priv`” or dump/reload to fix it!
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
[root@clusterserver1 software]#
[root@clusterserver1 software]#
[root@clusterserver1 software]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.7.19 MySQL Community Server (GPL)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> REPAIR TABLE `columns_priv`;
ERROR 1046 (3D000): No database selected
mysql> REPAIR TABLE `columns_priv`
-> ;
ERROR 1046 (3D000): No database selected
mysql> quit
Bye
[root@clusterserver1 software]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.7.19 MySQL Community Server (GPL)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> REPAIR TABLE `columns_priv`;
+——————–+——–+———-+————————————————————————————-+
| Table | Op | Msg_type | Msg_text |
+——————–+——–+———-+————————————————————————————-+
| mysql.columns_priv | repair | Note | TIME/TIMESTAMP/DATETIME columns of old format have been upgraded to the new format. |
| mysql.columns_priv | repair | status | OK |
+——————–+——–+———-+————————————————————————————-+
2 rows in set (0.00 sec)

mysql> REPAIR TABLE `db`;
+———-+——–+———-+———-+
| Table | Op | Msg_type | Msg_text |
+———-+——–+———-+———-+
| mysql.db | repair | status | OK |
+———-+——–+———-+———-+
1 row in set (0.01 sec)

mysql> REPAIR TABLE `proc`;
+————+——–+———-+————————————————————————————-+
| Table | Op | Msg_type | Msg_text |
+————+——–+———-+————————————————————————————-+
| mysql.proc | repair | Note | TIME/TIMESTAMP/DATETIME columns of old format have been upgraded to the new format. |
| mysql.proc | repair | Warning | Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘modified’ at row 1 |
| mysql.proc | repair | Error | Invalid default value for ‘modified’ |
| mysql.proc | repair | status | Operation failed |
+————+——–+———-+————————————————————————————-+
4 rows in set (0.00 sec)

mysql> REPAIR TABLE `procs_priv`;
+——————+——–+———-+————————————————————————————-+
| Table | Op | Msg_type | Msg_text |
+——————+——–+———-+————————————————————————————-+
| mysql.procs_priv | repair | Note | TIME/TIMESTAMP/DATETIME columns of old format have been upgraded to the new format. |
| mysql.procs_priv | repair | status | OK |
+——————+——–+———-+————————————————————————————-+
2 rows in set (0.00 sec)

mysql> REPAIR TABLE `proxies_priv`;
+——————–+——–+———-+————————————————————————————-+
| Table | Op | Msg_type | Msg_text |
+——————–+——–+———-+————————————————————————————-+
| mysql.proxies_priv | repair | Note | TIME/TIMESTAMP/DATETIME columns of old format have been upgraded to the new format. |
| mysql.proxies_priv | repair | status | OK |
+——————–+——–+———-+————————————————————————————-+
2 rows in set (0.00 sec)

mysql> REPAIR TABLE `slow_log`;
+—————-+——–+———-+————————————————————————————-+
| Table | Op | Msg_type | Msg_text |
+—————-+——–+———-+————————————————————————————-+
| mysql.slow_log | repair | Note | TIME/TIMESTAMP/DATETIME columns of old format have been upgraded to the new format. |
| mysql.slow_log | repair | status | OK |
+—————-+——–+———-+————————————————————————————-+
2 rows in set (0.01 sec)

mysql> REPAIR TABLE `tables_priv`;
+——————-+——–+———-+————————————————————————————-+
| Table | Op | Msg_type | Msg_text |
+——————-+——–+———-+————————————————————————————-+
| mysql.tables_priv | repair | Note | TIME/TIMESTAMP/DATETIME columns of old format have been upgraded to the new format. |
| mysql.tables_priv | repair | status | OK |
+——————-+——–+———-+————————————————————————————-+
2 rows in set (0.01 sec)

mysql> REPAIR TABLE `columns_priv`;
+——————–+——–+———-+———-+
| Table | Op | Msg_type | Msg_text |
+——————–+——–+———-+———-+
| mysql.columns_priv | repair | status | OK |
+——————–+——–+———-+———-+
1 row in set (0.00 sec)

mysql> REPAIR TABLE `event`;
+————-+——–+———-+————————————————————————————-+
| Table | Op | Msg_type | Msg_text |
+————-+——–+———-+————————————————————————————-+
| mysql.event | repair | Note | TIME/TIMESTAMP/DATETIME columns of old format have been upgraded to the new format. |
| mysql.event | repair | Warning | Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘modified’ at row 1 |
| mysql.event | repair | Error | Invalid default value for ‘modified’ |
| mysql.event | repair | status | Operation failed |
+————-+——–+———-+————————————————————————————-+
4 rows in set (0.00 sec)

mysql> REPAIR TABLE `general_log`;
+——————-+——–+———-+————————————————————————————-+
| Table | Op | Msg_type | Msg_text |
+——————-+——–+———-+————————————————————————————-+
| mysql.general_log | repair | Note | TIME/TIMESTAMP/DATETIME columns of old format have been upgraded to the new format. |
| mysql.general_log | repair | status | OK |
+——————-+——–+———-+————————————————————————————-+
2 rows in set (0.00 sec)

mysql> quit
Bye
[root@clusterserver1 software]# mysqlcheck mysql -uroot -p
Enter password:
mysql.columns_priv OK
mysql.db OK
mysql.event
error : Table upgrade required. Please do “REPAIR TABLE `event`” or dump/reload to fix it!
mysql.func OK
mysql.general_log OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc
error : Table upgrade required. Please do “REPAIR TABLE `proc`” or dump/reload to fix it!
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK

 

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>