{"id":154,"date":"2008-11-13T18:13:12","date_gmt":"2008-11-13T09:13:12","guid":{"rendered":"http:\/\/www.asfit.net\/blog\/kan\/?p=154"},"modified":"2008-11-13T18:13:12","modified_gmt":"2008-11-13T09:13:12","slug":"apache-mysql%e8%aa%8d%e8%a8%bc","status":"publish","type":"post","link":"https:\/\/www.asfit.net\/blog\/kan\/?p=154","title":{"rendered":"Apache MYSQL\u8a8d\u8a3c"},"content":{"rendered":"<p>\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n<code><br \/>\n# apt-get install libapache2-mod-auth-mysql<br \/>\n<\/code><br \/>\n# cd \/etc\/apache2\/mods-eabled<br \/>\n# ln -s  ..\/mods-available\/auth_mysql.load auth_b0_mysql.load<br \/>\n(Internal Error\u5bfe\u7b56\u306e\u70ba b0\u3092\u4ed8\u3051\u3066 auth_basic.load \u306e\u524d\u306b auth_mysql.load \u3092\u30ed\u30fc\u30c9\u3055\u305b\u308b)<br \/>\n# vi .htaccess<\/p>\n<pre>\nAuthType Basic\n#AuthBasicAuthoritative off\nAuthName \"Nossing User\"\nAuthMySQL on\nAuthMySQL_Host localhost\nAuthMySQL_User TESTUSER\nAuthMySQL_Password TESTPASSWD\nAuthMySQL_DB TESTDB\nAuthMySQL_Password_Table users_info\nAuthMySQL_UserName_Field userid\nAuthMySQL_Password_Field password\nAuthMySQL_Empty_Passwords off\nAuthMySQL_Encrypted_Passwords on\nAuthMySQL_Encryption_Types Plaintext Crypt_DES\nAuthMySQL_Scrambled_Passwords off\nAuthMySQL_Authoritative on\nrequire valid-user\n<\/pre>\n<p>#<br \/>\n# mysql -u root -prootpw<br \/>\nmysql&gt; create database TESTDB;<br \/>\nmysql&gt; create user TESTUSER;<br \/>\nmysql&gt; grant all privileges on TESTUSER.* to TESTDB@localhost identified by &#8216;TESTPASSWORD&#8217;;<br \/>\nmysql&gt; create table users_info ( userid varchar(16) not null,password  varchar(64) not null );<br \/>\nmysql&gt; insert into users_info values (&#8216;test1&#8242;,&#8217;test1&#8217;) ;<br \/>\nmysql&gt; insert into users_info values (&#8216;test2&#8217;,md5(&#8216;test2&#8217;)) ;<br \/>\nmysql&gt; insert into users_info values (&#8216;test3&#8217;,encrypt(&#8216;test3&#8217;)) ;<br \/>\nmysql&gt; insert into users_info values (&#8216;test4&#8217;,password(&#8216;test4&#8217;)) ;<br \/>\nPlaintext\u8a8d\u8a3c \u3068 Crypt_DES\u8a8d\u8a3c\u306f\u6b63\u5e38\u306b\u52d5\u4f5c\u3059\u308b\u304c Crypt_MD5 \u3068 MySQL \u8a8d\u8a3c\u306f\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u306a\u304b\u3063\u305f\u3002<br \/>\nError.log<br \/>\n[Thu Nov 13 17:58:08 2008] [error] Internal error: pcfg_openfile() called with NULL filename<br \/>\n[Thu Nov 13 17:58:08 2008] [error] [client xxx.xxx.xxx.xxx] (9)Bad file descriptor: Could not open password file: (null)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb # apt-get install libapache2-mod-auth-mysql # cd \/etc\/apache2\/mods-eabled # ln -s ..\/mods-availab&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-154","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.asfit.net\/blog\/kan\/index.php?rest_route=\/wp\/v2\/posts\/154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.asfit.net\/blog\/kan\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.asfit.net\/blog\/kan\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.asfit.net\/blog\/kan\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.asfit.net\/blog\/kan\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=154"}],"version-history":[{"count":0,"href":"https:\/\/www.asfit.net\/blog\/kan\/index.php?rest_route=\/wp\/v2\/posts\/154\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.asfit.net\/blog\/kan\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.asfit.net\/blog\/kan\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.asfit.net\/blog\/kan\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}