
Warning: Error while sending QUERY packet. PID=26270 in /home/uls/public_html/wordpress/wp-includes/class-wpdb.php on line 2357
{"id":48,"date":"2006-01-03T23:22:26","date_gmt":"2006-01-03T23:22:26","guid":{"rendered":"http:\/\/192.168.1.20\/wordpress\/freebsd\/2006\/01\/03\/berkeley_dbmysql\/"},"modified":"2006-01-03T23:22:26","modified_gmt":"2006-01-03T23:22:26","slug":"berkeley_dbmysql","status":"publish","type":"post","link":"http:\/\/uls.self.jp\/wordpress\/freebsd\/?p=48","title":{"rendered":"Berkeley DB\u304b\u3089MySQL\u3078\u79fb\u884c(\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u307e\u3057\u305f)"},"content":{"rendered":"<p>\u4ee5\u524d\u304b\u3089\u3001\u3084\u308d\u3046\u3068\u601d\u3063\u3066\u3044\u305fBerkeley DB\u304b\u3089MySQL\u3078\u306e\u79fb\u884c\u3092\u884c\u3044\u307e\u3057\u305f\u3002<br \/>\n\u79c1\u306e\u3068\u3053\u308d\u3067\u306fDB\u306e\u5bb9\u91cf\u304c\u7d046MB\u3067\u3042\u3063\u305f\u306e\u304c2MB\u306b\u306a\u308a\u3001\u5b9f\u884c\u901f\u5ea6\u3082\u3060\u3044\u3076\u5411\u4e0a\u3057\u307e\u3057\u305f\u3002<br \/>\nMySQL\u306fFreeBSD\u306epackage\u304b\u3089\u5165\u308c\u308b\u3053\u3068\u3092\u8a66\u307f\u305f\u306e\u3067\u3059\u304c\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6761\u4ef6\u306a\u3069\u304c\u6307\u5b9a\u3067\u304d\u306a\u3044\u306e\u3067\u3001ports\u304b\u3089\u5165\u308c\u76f4\u3057\u307e\u3057\u305f\u3002<br \/>\nMySQL\u306ePorts\u306f\/usr\/ports\/databases\u306b\u3042\u308a\u307e\u3059\u304c\u3001mysql323, mysql40, mysql50\u306e\uff13\u3064\u306e\u7248\u6570\u306e\u3082\u306e\u304c\u5165\u3063\u3066\u3044\u307e\u3059\u3002\u3000Web\u3067\u8abf\u3079\u308b\u3068mysql50\u306f\u307e\u3060\u554f\u984c\u3092\u62b1\u3048\u3066\u3044\u308b\u3088\u3046\u306a\u8a18\u8ff0\u304c\u3042\u308a\u307e\u3057\u305f\u306e\u3067mysql40\u3092\u5165\u308c\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<br \/>\n\u4e00\u5ea6package\u3067\u5165\u308c\u308b\u3068\u3001package\u3092\u524a\u9664\u3057\u3066\u3082\u5b8c\u5168\u306b\u306f\u6d88\u3055\u308c\u3066\u3044\u306a\u304f\u3066\u3001\u77db\u76fe\u3092\u751f\u3058\u308b\u306e\u3067\u3001\u5165\u308c\u308b\u524d\u306bmake deinstall\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3057\u305f\u3002<br \/>\n\u305d\u308c\u3068\u3001DB\u306e\u4f5c\u6210\u5148\u306fDefault\u3067\u306f\/var\/db\/mysql\u3067\u3059\u304c\u3001\u5bb9\u91cf\u306e\u6b8b\u308a\u304c\u305f\u3063\u3077\u308a\u306e\/usr\/db\/mysql\u3068\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002\u3000\u307e\u305f\u3001\u6587\u5b57\u30b3\u30fc\u30c9\u306feuc\u306b\u3057\u305f\u304b\u3063\u305f\u306e\u3067 ujis\u3068\u3057\u307e\u3057\u305f\u3002 \u6700\u521d\u6587\u5b57\u30b3\u30fc\u30c9\u3092euc\u3068\u66f8\u3044\u305f\u3089\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3057\u305f\u304c\u3001\u8abf\u3079\u308b\u3068euc\u306e\u6307\u5b9a\u306fujis\u3060\u3068\u5206\u304b\u308a\u307e\u3057\u305f\u3002<br \/>\neuc\u306a\u3089\u65e5\u672c\u8a9e\u4ee5\u5916\u306e\u3082\u4e2d\u56fd\u8a9e\u306eeuc\u3082\u3042\u308b\u3057\u3001eucjp\u3067\u306f\u9577\u3044\u306e\u3067ujis\u3068\u3057\u305f\u306e\u3060\u305d\u3046\u3067\u3059\u3002<br \/>\n\u306a\u3093\u3060\u304b\u3001\u8a00\u3044\u8a33\u3058\u307f\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre># mkdir \/usr\/db\n# cd \/usr\/ports\/databases\/mysql40-client\n# make deinstall\n# make WITH_CHARSET=ujis WITH_XCHARSET=all\nDB_DIR=\/usr\/db install clean<\/pre>\n<p>\u3060\u3044\u3076\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3057\u305f\u304c\u7121\u4e8b\u7d42\u4e86\u3057\u3066\u3001\u6b21\u306bmysql40-server\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u3059\u3002<\/p>\n<pre># cd ..\/mysql40-server\n# make deinstall\n# make WITH_CHARSET=ujis WITH_XCHARSET=all\nDB_DIR=\/usr\/db install clean<\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30aa\u30d7\u30b7\u30e7\u30f3\u306fclient\u3068\u540c\u3058\u3067\u3059\u304c\u3001\u540c\u3058\u3067\u306a\u3044\u3068\u5177\u5408\u304c\u60aa\u3044\u3088\u3046\u3067\u3059\u3002<br \/>\n\u6b21\u306bMovabletype\u304b\u3089\u4f7f\u3048\u308b\u3088\u3046\u306b\u3001p5-DBD-mysql40\u3068p5-Class-DBI-mysql\u3082\u5165\u308c\u307e\u3059\u3002<br \/>\n\u3053\u306e\u9806\u5e8f\u3067\u306a\u3044\u3068\u3001\u30a8\u30e9\u30fc\u304c\u3067\u307e\u3059\u3002\u3000<\/p>\n<pre># cd ..\/p5-DBD-mysql40\n# make install clean\n# cd ..\/p5-Class-DBI-mysql\n# make install clean<\/pre>\n<p>\u3053\u3053\u307e\u3067\u3001\u3046\u307e\u304f\u884c\u3063\u305f\u3089\u3001Movabletype\u306emt.cgi\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306b\u3042\u308bmt-check.cgi\u3092Browser\u304b\u3089\u8d77\u52d5\u3057\u3066DBI\u3068DBD\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<br \/>\n\u3053\u306e\u78ba\u8a8d\u3082\u53d6\u308c\u305f\u3089\u3001\u3044\u3088\u3044\u3088DB\u306e\u4f5c\u6210\u3067\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u4f5c\u696d\u3092\u3057\u307e\u3059\u3002<br \/>\n(1) \/usr\/local\/share\/mysql\u5185\u306b\u3042\u308bmy-medium.cnf\u3092my.cnf\u306e\u540d\u524d\u3067 \/etc\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002<\/p>\n<pre># cp \/usr\/local\/share\/mysql\/my-medium.cnf \/etc\/my.cnf<\/pre>\n<p>(2) \/etc\/my.cnf \u306b\u3000datadir = \/usr\/db\/mysql \u306e1\u884c\u3092\u8ffd\u52a0<\/p>\n<pre>[mysqld]\nport            = 3306\nsocket          = \/tmp\/mysql.sock\nskip-locking\ndatadir = \/usr\/db\/mysql\u3000\u30fb\u30fb\u30fb<font color=\"#ff0000\">\u3053\u306e\u884c\u3092\u8ffd\u52a0<\/font>\nkey_buffer = 16M<\/pre>\n<p>(3)  \/usr\/local\/bin\u306b\u3042\u308bmysql_install_db\u3092\u4f7f\u3063\u3066db\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre># mysql_install_db\n<\/pre>\n<p>(4) \/usr\/local\/etc\/rc.d\u5185\u306b\u3042\u308bmysql-server.sh \u306f\u8907\u96d1\u3067\u3046\u307e\u304f\u52d5\u304b\u306a\u304b\u3063\u305f\u306e\u3067\u3001\/usr\/local\/shre\/mysql\u5185\u306b\u3042\u308b\u3000mysql.server \u3092\/usr\/local\/etc\/rc.d\u306b\u30b3\u30d4\u30fc\u3057mysql-server.sh\u306b\u540d\u524d\u3092\u5909\u3048\u307e\u3059\u3002<\/p>\n<pre># cd \/usr\/local\/etc\/rc.d\n# mv mysql-server.sh mysql-server.org\n# cp \/usr\/local\/share\/mysql.server .\/mysql-server.sh<\/pre>\n<p>\u305d\u3057\u3066\u8d77\u52d5<\/p>\n<pre>\n# .\/mysql-server.sh start<\/pre>\n<p>\u3044\u3088\u3044\u3088\u3001\u7ba1\u7406\u8005\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a\u3067\u3059\u3002<\/p>\n<pre># mysql -u root\nWelcome to the MySQL monitor. Commands end with ; or g.\nYour MySQL connection id is 6 to server version: 4.0.17\nmysql&gt; set password for root=password('\u8a2d\u5b9a\u3059\u308b\u30d1\u30b9\u30ef\u30fc\u30c9');\nmysql&gt; flush privileges;\nmysql&gt; exit\nBye<\/pre>\n<p>\u6b21\u306bmysql\u3092\u518d\u8d77\u52d5\u3057\u3001\u533f\u540d\u30e6\u30fc\u30b6\u30fc\u3092\u524a\u9664\u3057\u307e\u3059\u3002<br \/>\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u76f4\u5f8c\u3001\u81ea\u52d5\u3067\u4f5c\u3089\u308c\u3066\u3044\u307e\u3059\u306e\u3067\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u70b9\u304b\u3089\u3082\u524a\u9664\u3057\u307e\u3059\u3002<\/p>\n<pre># mysql -u root -p\nEnter password: \u8a2d\u5b9a\u3057\u305f\u30d1\u30b9\u30ef\u30fc\u30c9\nmysql&gt; use mysql;\nmysql&gt; delete from user where password=' ';\nmysql&gt; flush privileges;\nmysql&gt; exit\nBye<\/pre>\n<p>\u3044\u3088\u3044\u3088\u3001mysql\u3092\u8d77\u52d5\u3057\u3066DB\u3092\u4f5c\u308a\u307e\u3059\u3002\u3000DB\u306e\u540d\u524d\u306fmtdb\u3068\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre># mysql -u root -p\nEnter password: \u30d1\u30b9\u30ef\u30fc\u30c9\nmysql&gt; create database mtdb;\nQuery OK, 1 row affected (0.00 sec)\nmysql&gt;<\/pre>\n<p>\u7d9a\u3044\u3066\u3001MovableType\u7528\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30e6\u30fc\u30b6\u30fc\u3092\u4f5c\u308a\u307e\u3059\u3002<br \/>\n\u30e6\u30fc\u30b6\u30fc\u540d\u3092 mtuser \u3068\u3057\u307e\u3057\u305f\u304c\u3001\u4f5c\u3063\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 mtdb \u306b\u5bfe\u3057\u3066\u306e\u3059\u3079\u3066\u306e\u6a29\u9650\u3092\u4e0e\u3048\u307e\u3059\u3002<br \/>\n\u30d1\u30b9\u30ef\u30fc\u30c9\u306fMovabletype\u304c\u4f7f\u3046\u3082\u306e\u3067\u65b0\u3057\u304f\u6c7a\u3081\u3066\u3001\u5f8c\u307b\u3069mt-config-cgi\u306b\u3082\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<pre>mysql&gt; use mysql;\nmysql&gt; grant all privileges on mtdb.*\nto mtuser@localhost identified by '\u30d1\u30b9\u30ef\u30fc\u30c9';\nQuery OK, 0 rows affected (0.13 sec)\nmysql&gt; flush privileges;\nmysql&gt; exit\nBye<\/pre>\n<p>\u4ee5\u4e0a\u3067\u5b8c\u4e86\u3067\u3059\u3002<br \/>\n\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4e0a\u306e\u30c6\u30fc\u30d6\u30eb\u306f\u3001MovableType\u304c\u81ea\u52d5\u3067\u4f5c\u308a\u307e\u3059\u3002<br \/>\nmysql\u306e\u30b3\u30de\u30f3\u30c9\u306f\u8a9e\u53e5\u306b\u30b9\u30da\u30eb\u30df\u30b9\u304c\u3042\u3063\u305f\u308a\u3059\u308b\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u6587\u672b\u306e&#8221;;&#8221;\u307e\u3067\u542b\u3081\u3066\u6b63\u78ba\u306b\u5165\u308c\u308b\u306e\u304c\u8981\u6ce8\u610f\u70b9\u3067\u3059\u3002<br \/>\n\u3055\u3066\u3001\u3044\u3088\u3044\u3088DB\u306e\u79fb\u884c\u4f5c\u696d\u3067\u3059\u3002<br \/>\nmt.cgi\u306e\u3042\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306b\u3042\u308bmt-config.cgi\u306e\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3055\u308c\u3066\u3044\u308b\u4e0b\u8a18\u306e\u90e8\u5206\u3092\u7de8\u96c6\u3057\u307e\u3059\u3002<br \/>\n\u30d1\u30b9\u30ef\u30fc\u30c9\u306fDB\u306e\u4f5c\u6210\u3067mtuser\u306b\u4e0e\u3048\u305f\u30d1\u30b9\u30ef\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<pre>ObjectDriver DBI::mysql\nDatabase mtdb\nDBUser mtuser\nDBPassword \u30d1\u30b9\u30ef\u30fc\u30c9\nDBHost localhost<\/pre>\n<p>\u3053\u306e\u3068\u304d\u3000DataSource .\/db \u306e\u8a2d\u5b9a\u306f\u305d\u306e\u307e\u307e\u6b8b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n\u305d\u3057\u3066\u3001Brawser\u304b\u3089 mt-db2sql.cgi \u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<br \/>\n\u8a2d\u5b9a\u304c\u6b63\u3057\u3051\u308c\u3070\u3001\u753b\u9762\u306b\u5ef6\u3005\u3068\u6570\u5b57\u3089\u3057\u304d\u3082\u306e\u304c\u8868\u793a\u3055\u308c\u3001\u304b\u306a\u308a\u306e\u6642\u9593\u306e\u7d4c\u904e\u5f8c\u306b All well done\u3060\u3063\u305f\u3068\u601d\u3046\u304c\u3001\u3046\u307e\u304f\u884c\u3063\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u3066\u7d42\u4e86\u3057\u307e\u3059\u3002<br \/>\n\u3053\u3053\u3067\u3001\u5148\u306emt-config.cgi\u306eDataSource .\/db\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3059\u308b\u3002<br \/>\n\u5b9f\u969b\u306edb\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u6d88\u3057\u3066\u3082\u304b\u307e\u308f\u306a\u3044\u304c\u3001\u79fb\u884c\u3057\u305f\u3082\u306e\u304c\u6b63\u3057\u304f\u52d5\u4f5c\u3059\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3055\u308c\u308b\u307e\u3067\u306f\u3001\u53d6\u3063\u3066\u304a\u304f\u304b\u3001\u540d\u524d\u3092\u5909\u3048\u3066\u6e29\u5b58\u3057\u305f\u65b9\u304c\u7121\u96e3\u3067\u3057\u3087\u3046\u3002<br \/>\n\u7d50\u69cb\u3001\u3053\u307e\u304b\u3044\u4f5c\u696d\u3060\u304c\u3001\u9806\u3092\u8ffd\u3063\u3066\u3084\u3063\u3066\u884c\u3051\u3070\u79fb\u884c\u4f5c\u696d\u306f\u5b8c\u4e86\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5\u524d\u304b\u3089\u3001\u3084\u308d\u3046\u3068\u601d\u3063\u3066\u3044\u305fBerkeley DB\u304b\u3089MySQL\u3078\u306e\u79fb\u884c\u3092\u884c\u3044\u307e\u3057\u305f\u3002 \u79c1\u306e\u3068\u3053\u308d\u3067\u306fDB\u306e\u5bb9\u91cf\u304c\u7d046MB\u3067\u3042\u3063\u305f\u306e\u304c2MB\u306b\u306a\u308a\u3001\u5b9f\u884c\u901f\u5ea6\u3082\u3060\u3044\u3076\u5411\u4e0a\u3057\u307e\u3057\u305f\u3002 MySQL\u306fFreeBSD\u306epackag &hellip; <a href=\"http:\/\/uls.self.jp\/wordpress\/freebsd\/?p=48\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-48","post","type-post","status-publish","format-standard","hentry","category-movabletype","wpautop"],"_links":{"self":[{"href":"http:\/\/uls.self.jp\/wordpress\/freebsd\/index.php?rest_route=\/wp\/v2\/posts\/48","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/uls.self.jp\/wordpress\/freebsd\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/uls.self.jp\/wordpress\/freebsd\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/uls.self.jp\/wordpress\/freebsd\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/uls.self.jp\/wordpress\/freebsd\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=48"}],"version-history":[{"count":0,"href":"http:\/\/uls.self.jp\/wordpress\/freebsd\/index.php?rest_route=\/wp\/v2\/posts\/48\/revisions"}],"wp:attachment":[{"href":"http:\/\/uls.self.jp\/wordpress\/freebsd\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=48"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/uls.self.jp\/wordpress\/freebsd\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=48"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/uls.self.jp\/wordpress\/freebsd\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=48"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}