Ubuntu

Ubuntu12.04LTSから14.04LTSにアップグレード(MySQL編)

結論からすると、今回は問題ではなかった模様。
ただし、MySQLのパフォーマンスが良くなるっぽい。

広告


ふと見るとこんなログが出ている。

May  5 10:45:42 hogeserver /etc/mysql/debian-start[3279]: Upgrading MySQL tables if necessary.
May  5 10:45:45 hogeserver /etc/mysql/debian-start[3282]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
May  5 10:45:45 hogeserver /etc/mysql/debian-start[3282]: Looking for 'mysql' as: /usr/bin/mysql
May  5 10:45:45 hogeserver /etc/mysql/debian-start[3282]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
May  5 10:45:45 hogeserver /etc/mysql/debian-start[3282]: This installation of MySQL is already upgraded to 5.5.43, use --force if you still need to run mysql_upgrade
May  5 10:45:45 hogeserver /etc/mysql/debian-start[3353]: Checking for insecure root accounts.
May  5 10:45:45 hogeserver /etc/mysql/debian-start[3358]: Triggering myisam-recover for all MyISAM tables

何かバージョンアップしたことによって変わっているかもしれないので、テーブルのアップグレードしてみよう。

色々なところに情報があり、今回は「yum で MySQL バージョンアップ後に実行するチェックコマンド、それは mysql_upgrade」を参考にさせていただいた。

$ mysql_upgrade -u root -p
Enter password:
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysqld/mysqld.sock'
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysqld/mysqld.sock'
mysql.columns_priv                                 OK
《省略》
zarafa.versions                                    OK
Running 'mysql_fix_privilege_tables'...
OK
Could not create the upgrade info file '/var/lib/mysql/mysql_upgrade_info' in the MySQL Servers datadir, errno: 13

は?何だろうこれは・・・。

ここで色々探してみたら「CentOS6でyumを使ってmysqlからMariaDBにした(なった)話」に重要な情報が!

これを参考に。

$ su -
# mysql_upgrade -u root -p
Enter password:
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
This installation of MySQL is already upgraded to 5.5.43, use --force if you still need to run mysql_upgrade

もう一回トライ。

# mysql_upgrade -u root -p --force
Enter password:
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysqld/mysqld.sock'
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysqld/mysqld.sock'
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
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                                         OK
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
wordpress.wp_2_comment_notifier                    OK
wordpress.wp_2_commentmeta                         OK
wordpress.wp_2_comments                            OK
wordpress.wp_2_links                               OK
wordpress.wp_2_options                             OK
wordpress.wp_2_post_notification_cats              OK
wordpress.wp_2_post_notification_posts             OK
wordpress.wp_2_postmeta                            OK
wordpress.wp_2_posts                               OK
wordpress.wp_2_subscribe2                          OK
wordpress.wp_2_term_relationships                  OK
wordpress.wp_2_term_taxonomy                       OK
wordpress.wp_2_terms                               OK
wordpress.wp_2_user_login_log                      OK
wordpress.wp_3_commentmeta                         OK
wordpress.wp_3_comments                            OK
wordpress.wp_3_links                               OK
wordpress.wp_3_options                             OK
wordpress.wp_3_postmeta                            OK
wordpress.wp_3_posts                               OK
wordpress.wp_3_term_relationships                  OK
wordpress.wp_3_term_taxonomy                       OK
wordpress.wp_3_terms                               OK
wordpress.wp_4_commentmeta                         OK
wordpress.wp_4_comments                            OK
wordpress.wp_4_links                               OK
wordpress.wp_4_options                             OK
wordpress.wp_4_postmeta                            OK
wordpress.wp_4_posts                               OK
wordpress.wp_4_subscribe2                          OK
wordpress.wp_4_term_relationships                  OK
wordpress.wp_4_term_taxonomy                       OK
wordpress.wp_4_terms                               OK
wordpress.wp_blog_versions                         OK
wordpress.wp_blogs                                 OK
wordpress.wp_commentmeta                           OK
wordpress.wp_comments                              OK
wordpress.wp_links                                 OK
wordpress.wp_options                               OK
wordpress.wp_postmeta                              OK
wordpress.wp_posts                                 OK
wordpress.wp_registration_log                      OK
wordpress.wp_signups                               OK
wordpress.wp_site                                  OK
wordpress.wp_sitemeta                              OK
wordpress.wp_subscribe2                            OK
wordpress.wp_term_relationships                    OK
wordpress.wp_term_taxonomy                         OK
wordpress.wp_terms                                 OK
wordpress.wp_user_login_log                        OK
wordpress.wp_usermeta                              OK
wordpress.wp_users                                 OK
wordpress.wp_wassup                                OK
wordpress.wp_wassup_meta                           OK
wordpress.wp_wassup_tmp                            OK
zarafa.abchanges                                   OK
zarafa.acl                                         OK
zarafa.changes                                     OK
zarafa.clientupdatestatus                          OK
zarafa.deferredupdate                              OK
zarafa.hierarchy                                   OK
zarafa.indexedproperties                           OK
zarafa.lob                                         OK
zarafa.mvproperties                                OK
zarafa.names                                       OK
zarafa.object                                      OK
zarafa.objectmvproperty                            OK
zarafa.objectproperty                              OK
zarafa.objectrelation                              OK
zarafa.outgoingqueue                               OK
zarafa.properties                                  OK
zarafa.receivefolder                               OK
zarafa.searchresults                               OK
zarafa.settings                                    OK
zarafa.singleinstances                             OK
zarafa.stores                                      OK
zarafa.syncedmessages                              OK
zarafa.syncs                                       OK
zarafa.tproperties                                 OK
zarafa.users                                       OK
zarafa.versions                                    OK
Running 'mysql_fix_privilege_tables'...
OK

できた。


後からどんなものなのかを確認すると、こんな感じ。

$ sudo ls -la /var/lib/mysql/mysql_upgrade_info
-rw-rw---- 1 mysql mysql 6  5月  6 17:32 /var/lib/mysql/mysql_upgrade_info

$ sudo cat /var/lib/mysql/mysql_upgrade_info
5.5.43


では、ログの出力は止まったかなー・・・。No!

$ sudo service mysql restart
mysql stop/waiting
mysql start/running, process 24132

/var/log/syslog

May  6 17:44:01 hogeserver /etc/mysql/debian-start[24172]: Upgrading MySQL tables if necessary.
May  6 17:44:01 hogeserver /etc/mysql/debian-start[24176]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
May  6 17:44:01 hogeserver /etc/mysql/debian-start[24176]: Looking for 'mysql' as: /usr/bin/mysql
May  6 17:44:01 hogeserver /etc/mysql/debian-start[24176]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
May  6 17:44:01 hogeserver /etc/mysql/debian-start[24176]: This installation of MySQL is already upgraded to 5.5.43, use --force if you still need to run mysql_upgrade
May  6 17:44:01 hogeserver /etc/mysql/debian-start[24187]: Checking for insecure root accounts.
May  6 17:44:01 hogeserver /etc/mysql/debian-start[24192]: Triggering myisam-recover for all MyISAM tables

なんら変わることはなかった・・・。

広告

コメントはこちらから お気軽にどうぞ ~ 投稿に関するご意見・感想・他