[WBEL-users] mod_auth_mysql
Thomas E Dukes
edukes at alltel.net
Mon Jun 27 20:42:39 CDT 2005
Hello,
I was trying to get this mod working but have be unable to do so. I created
the database and table following the 'basic authorization' example in
mod_auth_mysql.conf.
Here are my files:
Mod_auth_mysql:
#
LoadModule mysql_auth_module modules/mod_auth_mysql.so
# This will enable user-based MySQL authentication of everything
# within /var/www. You'll need to do the following as the MySQL
# root user beforehand:
#
# CREATE DATABASE auth;
# USE auth;
# CREATE TABLE users (
# user_name CHAR(30) NOT NULL,
# user_passwd CHAR(20) NOT NULL,
# PRIMARY KEY (user_name)
# );
# GRANT SELECT
# ON auth.users
# TO authuser at localhost
# IDENTIFIED BY 'PaSsW0Rd';
#
# INSERT INTO users VALUES ('testuser', ENCRYPT('testpass'));
#
<Directory /var/www/html/phpMyAdmin>
AuthName "phpMyAdmin Access"
AuthType Basic
AuthMySQLUser authuser
AuthMySQLPassword PaSsW0Rd
AuthMySQLDB auth
AuthMySQLUserTable users
AuthMySQLNameField user_name
AuthMySQLPasswordField user_passwd
require valid-user
</Directory>
.htaccess:
AuthName "phpMyAdmin Access"
AuthType Basic
AuthMySQLHost localhost
AuthMySQLDB auth
AuthMySQLUserTable users
AuthMySQLEnable On
require valid-user
Apache error log:
[Mon Jun 27 21:19:24 2005] [error] [client 151.213.91.37] MySQL ERROR:
SELECT command denied to user ''@'localhost' for table 'users': /phpMyAdmin/
[Mon Jun 27 21:19:24 2005] [error] [client 151.213.91.37] MySQL user
testuser not found: /phpMyAdmin/
[Mon Jun 27 21:19:36 2005] [error] [client 151.213.91.37] MySQL ERROR:
SELECT command denied to user ''@'localhost' for table 'users': /phpMyAdmin/
[Mon Jun 27 21:19:36 2005] [error] [client 151.213.91.37] MySQL user
testuser not found: /phpMyAdmin/
[Mon Jun 27 21:19:49 2005] [error] [client 151.213.91.37] MySQL ERROR:
SELECT command denied to user ''@'localhost' for table 'users': /phpMyAdmin/
[Mon Jun 27 21:19:49 2005] [error] [client 151.213.91.37] MySQL user
testuser not found: /phpMyAdmin/
This has me stumped. Been working on it for 2 days now. :-(
Any help would be appreciate!
More information about the Whitebox-users
mailing list