{"id":38,"date":"2011-08-09T12:19:43","date_gmt":"2011-08-09T04:19:43","guid":{"rendered":"http:\/\/www.uut8.com\/?p=38"},"modified":"2011-08-09T12:19:43","modified_gmt":"2011-08-09T04:19:43","slug":"centos-5-%e7%bc%96%e8%af%91%e5%ae%89%e8%a3%85-mysql-5-5-x-%e6%96%b0%e7%89%88%e6%9c%ac","status":"publish","type":"post","link":"https:\/\/www.uut8.com\/?p=38","title":{"rendered":"CentOS 5 \u7f16\u8bd1\u5b89\u88c5 MySQL 5.5.x \u65b0\u7248\u672c"},"content":{"rendered":"<p>Oracle\u8868\u793a\uff0c\u6309\u7167\u5185\u90e8\u7684\u6807\u51c6\uff0c\u5728Linux\u4e0a\uff0cMySQL 5.5\u7684\u8bfb\u5199\u901f\u5ea6\u6bd45.1\u7248\u672c\u63d0\u5347\u4e86360%\u3002\u5728Windows Server\u673a\u5668\u4e0a\uff0c\u8fd9\u65b9\u9762\u6027\u80fd\u7684\u63d0\u5347\u8d85\u8fc7\u4e861500%\u3002<br \/>\n\u800c\u6211\u4eec\u7684 Discuz!\u00a0 \u548c Discuz! X \u7cfb\u5217\u90fd\u53ef\u4ee5\u5b8c\u7f8e\u517c\u5bb9 MySQL 5.5 \u7248\u672c\uff0c\u4e0d\u4f1a\u50cf\u67d0\u4e2a\u5176\u4ed6\u8bba\u575b\u8f6f\u4ef6\u90a3\u6837\u4f1a\u51fa\u73b0 TYPE \u62a5\u9519\u3002<br \/>\n\u65e2\u7136\u7a0b\u5e8f\u517c\u5bb9\uff0c\u6027\u80fd\u53c8\u63d0\u5347\u5982\u6b64\u4e4b\u5927\uff0c\u90a3\u6211\u4eec\u5b89\u88c5 PHP + MySQL \u7684\u65f6\u5019\uff0c\u5c31\u9009 5.5 \u7248\u672c\u5427\uff0c\u4e0d\u8fc7 5.5 \u7248\u672c\u5728 Linux \u4e0a\u7684\u5b89\u88c5\u548c\u4ee5\u5916\u7684 5.0 5.1\u7248\u672c\u5df2\u7ecf\u4e0d\u4e00\u6837\u4e86\u3002<br \/>\n\u4e0b\u9762\u662f\u5728 CentOS 5 \u4e0b\u7684\u63a8\u8350\u6b65\u9aa4\u3002<\/p>\n<p>1\uff0c\u5b89\u88c5bison\u548ccmake<br \/>\n\u63d0\u793a\uff1aMySQL 5.5 \u7248\u672c\u7684\u5b89\u88c5\u9700\u8981\u8fd9\u4e24\u4e2a\u8f6f\u4ef6\uff0cbison\u6211\u4eec\u53ef\u4ee5\u7528\u65b9\u4fbf\u7684yum\u76f4\u63a5\u5b89\u88c5\u597d\uff0ccmake\u5219\u7528\u7f16\u8bd1\u5b89\u88c5\u7684\u529e\u6cd5\u3002<br \/>\nyum install bison<br \/>\nwget <a href=\"http:\/\/www.cmake.org\/files\/v2.8\/cmake-2.8.4.tar.gz\" target=\"_blank\" rel=\"noopener\">http:\/\/www.cmake.org\/files\/v2.8\/cmake-2.8.4.tar.gz<\/a><br \/>\ntar zxvf cmake-2.8.4.tar.gz<br \/>\ncd cmake-2.8.4\/<br \/>\n.\/configure<br \/>\ngmake<br \/>\ngmake install<\/p>\n<p>2,\u4e0b\u8f7dMYSQL 5.5.13<br \/>\n\u4e0b\u8f7d\u5730\u5740\uff1a<a href=\"http:\/\/dev.mysql.com\/get\/Downloads\/MySQL-5.5\/mysql-5.5.13.tar.gz\/from\/http:\/\/mysql.ntu.edu.tw\/\" target=\"_blank\" rel=\"noopener\">http:\/\/dev.mysql.com\/get\/Downloa &#8230; \/\/mysql.ntu.edu.tw\/<\/a><br \/>\n\u5982\u679c\u4e0b\u8f7d\u901f\u5ea6\u592a\u6162\uff0c\u4e5f\u53ef\u4ee5\u6253\u5f00<a href=\"http:\/\/dev.mysql.com\/downloads\/mirror.php?id=402746\" target=\"_blank\" rel=\"noopener\">http:\/\/dev.mysql.com\/downloads\/mirror.php?id=402746<\/a><br \/>\n\u7136\u540e\u70b9No thanks, just take me to the downloads!<br \/>\n\u5c31\u4f1a\u51fa\u73b0\u4e0b\u8f7d\u70b9\u5217\u8868\u3002<!--more--><\/p>\n<p>3,\u5b89\u88c5<br \/>\n\u63d0\u793a\uff1a\u5982\u679c\u673a\u5668\u4e0a\u5df2\u6709\u81ea\u5e26\u7684MySQL\u7248\u672c\uff0c\u6700\u597d\u5148\u5378\u8f7d\u81ea\u5e26\u7684MySQL\uff0c\u4ee5\u9632\u4ee5\u540e\u4f7f\u7528\u7684\u65f6\u5019\u6df7\u6dc6\u3002<br \/>\n\u5378\u8f7d\u547d\u4ee4:yum remove mysql<br \/>\n\u5982\u679c\u4e0d\u786e\u5b9a\u673a\u5668\u4e0a\u662f\u5426\u81ea\u5e26\u6709MySQL,\u4e5f\u4e00\u6837\u53ef\u4ee5\u6267\u884c\u4e0b\u5378\u8f7d\u547d\u4ee4\u65e0\u59a8\u3002<\/p>\n<p>\/usr\/sbin\/groupadd mysql\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \uff08\u5982\u679c\u6709\u63d0\u793a\u5df2\u5b58\u5728\uff0c\u5e76\u4e0d\u662f\u9519\u8bef\uff09<br \/>\n\/usr\/sbin\/useradd -g mysql mysql\u00a0\u00a0\u00a0\u00a0 \uff08\u5982\u679c\u6709\u63d0\u793a\u5df2\u5b58\u5728\uff0c\u5e76\u4e0d\u662f\u9519\u8bef\uff09<br \/>\nmkdir -p \/data\/mysql<br \/>\nchown -R mysql:mysql \/data\/mysql<br \/>\ntar zxvf mysql-5.5.13.tar.gz<br \/>\ncd mysql-5.5.13<br \/>\ncmake . -DCMAKE_INSTALL_PREFIX=\/usr\/local\/mysql -DMYSQL_DATADIR=\/data\/mysql -DSYSCONFDIR=\/etc\/<br \/>\nmake<br \/>\nmake install<\/p>\n<p>4\uff0c\u8bbe\u7f6e<\/p>\n<p>cd \/usr\/local\/mysql<br \/>\ncp .\/support-files\/my-huge.cnf \/etc\/my.cnf<\/p>\n<p>\u7f16\u8f91\/etc\/my.cnf<br \/>\n\u5728 [mysqld] \u6bb5\u589e\u52a0<br \/>\ndatadir = \/data\/mysql<br \/>\nwait-timeout = 30<br \/>\nmax_connections = 512<br \/>\nmax_connect_errors = 10000000<br \/>\ndefault-storage-engine=MyISAM<br \/>\n\u5728 [mysqld] \u6bb5\u4fee\u6539<br \/>\nmax_allowed_packet = 16M<\/p>\n<p>.\/scripts\/mysql_install_db &#8211;user=mysql<br \/>\ncp .\/support-files\/mysql.server \/etc\/rc.d\/init.d\/mysqld<br \/>\nchmod 755 \/etc\/rc.d\/init.d\/mysqld<br \/>\nchkconfig &#8211;add mysqld<br \/>\nchkconfig &#8211;level 3 mysqld on<\/p>\n<p>\u7f16\u8bd1\/etc\/rc.d\/init.d\/mysqld<br \/>\n\u628abasedir=\u7f16\u8f91\u6210basedir=\/usr\/local\/mysql<br \/>\n\u628adatadir=\u7f16\u8f91\u6210datadir=\/data\/mysql<\/p>\n<p>service mysqld start<br \/>\nbin\/mysqladmin -u root password &#8216;password_for_root&#8217;<br \/>\n\u5176\u4e2d\u5f15\u53f7\u5185\u7684password_for_root\u662f\u8981\u8bbe\u7f6e\u7684root\u5bc6\u7801<br \/>\nservice mysqld restart<\/p>\n<p>\u73b0\u5728 MySQL 5.5 \u5c31\u5b89\u88c5\u597d\u4e86\u3002<\/p>\n<p>\u8bba\u575b\u5bfc\u822a\u79fb\u6b65\uff1a<a href=\"http:\/\/luntan.uut8.com\">http:\/\/luntan.uut8.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Oracle\u8868\u793a\uff0c\u6309\u7167\u5185\u90e8\u7684\u6807\u51c6\uff0c\u5728Linux\u4e0a\uff0cMySQL&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-38","post","type-post","status-publish","format-standard","hentry","category-mysql"],"_links":{"self":[{"href":"https:\/\/www.uut8.com\/index.php?rest_route=\/wp\/v2\/posts\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.uut8.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.uut8.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.uut8.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.uut8.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=38"}],"version-history":[{"count":0,"href":"https:\/\/www.uut8.com\/index.php?rest_route=\/wp\/v2\/posts\/38\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.uut8.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.uut8.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.uut8.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}