Squid完成了接着是mysql了我的数据库没有初始话,一些安全措施都没有作,用的是root用户而且密码是空的所以可能和实际做的不一样了,实际的root的应该有密码
mysql> insert into data values ('wjp', '123456');
Query OK, 1 row affected (0.00 sec)
mysql>
mysql> insert into data values ('wjp', password("123456"));
Query OK, 1 row affected (0.00 sec)
如果你的mysql不和squid装在一台机器上,你就要配置mysql_auth.conf这个文件了以下是对mysql_auth.conf简单的解释,说明写的很清楚,如果你熟悉mysql的话作这个没有问题的。我也不多说了。如果不太明白的我建议先看看mysql。
现在来看看mysql_auth.conf
# hostname
#
# where is the mysql server - the server hostname or IP address;
# first 'hostname' directive, and after space(s) or tab(s)
its
# value
#
# default:
#这个选项就是指定mysql数据库的,如果不是同一台机器,那么请指定ip或者hostname.
hostname localhost
# user
#
# which user can connect to database
# default:
#这个就是mysql_auth是以什么用户连接mysql数据库的默认是squid,如果你想改变,mysql
#数据库中应该有这个用户可以登陆的
user squid
# password
#
# user's password for database, that store the accounts
# default:
#连接用的密码
password squid
# database
#
# mysql database name, where accounts places are
# default:
#用到的库
database mysql_auth
# next three directives tells what will the select query,
# like this:
# SELECT * FROM table WHERE user_column LIKE "username"
AND password_column LIKE "password"
# where username and password comes from client in HTTP header,
# and user_column and password_column is the columns name
in table
# this is an easy way to tune this program to your existing
database
# table
#
# the table name, where accounts exist in user-password pair
# default:
#用到的表
table data
# user_column
#
# user column name in table
# if you already have a database, what contains user-password
# pair, you can set it here
#帐号字段
user_column user
# password_column
#
# password column name in table
# like user column name above
#用户密码字段
password_column password
# encrypt_password_form
#
# passwords are stored in encrypted form,
# using mysql internal 'password()' function
# this mean, you just storing the passwords encrypted format,
# Squid and clients doesn't use encrypt form!
# The value is case insensitive (YES/yes or not one of these).
# For backward compatibility, default is NO.
#是否使用密码文存储
encrypt_password_form NO
本功能正在开发中,目前不能使用,敬请原谅。
√ 期刊在线投稿: /journal/contribute.html
√ 本文打印于《CNFUG期刊》,欢迎访问 http://www.cnfug.net 获取更多技术文章。
© 2003-2006 CNFUG(China FreeBSD User Group) All rights reserved.
Powered by FreeBSD
不错,希望高手们能够再写一些squid优化的文章.