{"id":331,"date":"2012-08-13T17:23:24","date_gmt":"2012-08-13T09:23:24","guid":{"rendered":"http:\/\/blog.nami.idv.tw\/?p=331"},"modified":"2016-04-19T15:38:50","modified_gmt":"2016-04-19T07:38:50","slug":"%e5%8d%87%e7%b4%9a-mysql-5-1-%e8%87%b3-5-5-windows","status":"publish","type":"post","link":"https:\/\/blog.nami.idv.tw\/?p=331","title":{"rendered":"\u5347\u7d1a MySQL 5.1 \u81f3 5.5 (Windows)"},"content":{"rendered":"<p>\u6b65\u9a5f\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li>\u5148\u5efa\u7acb\u4e00\u500b\u5de5\u4f5c\u76ee\u9304 MySQL_Upgrade<\/li>\n<li>\u8907\u88fd 5.1 \u7248\u7684 my.ini \u5230\u5de5\u4f5c\u76ee\u9304<\/li>\n<li><span style=\"color: #999999;\">MySQL_Upgrade&gt;<\/span> mysqldump -h localhost -u root -p -A &gt; full_database.sql<\/li>\n<li><span style=\"color: #999999;\">MySQL_Upgrade&gt;<\/span>\u00a0mysqldump -h localhost -u root -p --database mysql &gt; mysql.sql<\/li>\n<li><span style=\"color: #999999;\">MySQL_Upgrade&gt;<\/span>\u00a0mysqladmin shutdown -u root -p<\/li>\n<li>\u8907\u88fd 5.1 \u7248\u7684\u8cc7\u6599\u76ee\u9304\u5230\u5de5\u4f5c\u76ee\u9304<br \/>\n(\u7cfb\u7d71\u9810\u8a2d\u662f C:\\Program Files\\MySQL\\MySQL Server 5.1\\data\\)<\/li>\n<li>\u89e3\u9664\u5b89\u88dd MySQL 5.1<\/li>\n<li>\u5b89\u88dd MySQL 5.5<\/li>\n<li>\u5b89\u88dd\u5b8c\u7562\u3001\u555f\u52d5\u5f8c<br \/>\n<span style=\"color: #999999;\">MySQL_Upgrade&gt;<\/span>\u00a0mysqladmin shutdown -u root -p<\/li>\n<li>\u8907\u88fd 5.1 \u7684 my.ini \u5230 5.5 \u76ee\u9304\u4e2d\u84cb\u6389\u9810\u8a2d my.ini<\/li>\n<li>\u4fee\u6b63\u4e00\u4e0b my.ini \u88e1\u7684\u8a2d\u5b9a\u8def\u5f91<\/li>\n<li>\u5c07 5.1 \u7684\u8cc7\u6599\u76ee\u9304\u8907\u88fd\u5230 5.5 \u53bb<\/li>\n<li><span style=\"color: #999999;\">MySQL_Upgrade&gt;<\/span>\u00a0mysqld --skip-grant-tables --user=mysql<br \/>\n(\u9019\u6703\u6301\u7e8c run \u8457 mysqld \u6240\u4ee5\u63a5\u4e0b\u4f86\u8981\u518d\u958b\u4e00\u500b cmd \u9032\u884c)<\/li>\n<li><span style=\"color: #999999;\">MySQL_Upgrade&gt;<\/span>\u00a0mysql &lt; mysql.sql<\/li>\n<li><span style=\"color: #999999;\">MySQL_Upgrade&gt;<\/span> mysql_upgrade<\/li>\n<li>\u78ba\u8a8d\u4e00\u4e0b mysql_upgrade \u7684\u7d50\u679c\u662f\u4e0d\u662f\u90fd <strong>OK<\/strong><\/li>\n<li><span style=\"color: #999999;\">MySQL_Upgrade&gt;<\/span>\u00a0mysqladmin shutdown -u root -p<\/li>\n<li><span style=\"color: #999999;\">MySQL_Upgrade&gt;<\/span> net start mysql<\/li>\n<li>\u5b8c\u6210 \u30fd(\u00b4\u30fc\uff40)\u30ce<\/li>\n<\/ol>\n<p>Linux \u7248\u7684\u53ef\u4ee5\u53c3\u8003 <a href=\"http:\/\/www.ovaistariq.net\/490\/a-step-by-step-guide-to-upgrading-to-mysql-5-5\/\">A step by step guide to upgrading to MySQL 5.5<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6b65\u9a5f\u5982\u4e0b\uff1a \u5148\u5efa\u7acb\u4e00\u500b\u5de5\u4f5c\u76ee\u9304 MySQL_Upgrade \u8907\u88fd 5.1 \u7248\u7684  &hellip; <a href=\"https:\/\/blog.nami.idv.tw\/?p=331\">\u95b1\u8b80\u5168\u6587 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[10],"tags":[],"class_list":["post-331","post","type-post","status-publish","format-standard","hentry","category-it-note"],"_links":{"self":[{"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=331"}],"version-history":[{"count":5,"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/331\/revisions"}],"predecessor-version":[{"id":578,"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/331\/revisions\/578"}],"wp:attachment":[{"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}