免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1770 | 回复: 2
打印 上一主题 下一主题

[FTP] proftpd结合mysql安装问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-02-28 17:34 |只看该作者 |倒序浏览
proftpd版本是1.2.10
mysql版本是5.0.18
proftpd.sql.log错误提示:

Feb 28 17:21:21 mod_sql/4.11[3446]: backend module 'mod_sql_mysql/4.04'
Feb 28 17:21:21 mod_sql/4.11[3446]: backend api    'mod_sql_api_v1'
Feb 28 17:21:21 mod_sql/4.11[3446]: >>> sql_getconf
Feb 28 17:21:21 mod_sql/4.11[3446]: entering    mysql cmd_defineconnection
Feb 28 17:21:21 mod_sql/4.11[3446]:  name: 'default'
Feb 28 17:21:21 mod_sql/4.11[3446]:  user: 'root'
Feb 28 17:21:21 mod_sql/4.11[3446]:  host: 'localhost'
Feb 28 17:21:21 mod_sql/4.11[3446]:    db: 'ftpdb'
Feb 28 17:21:21 mod_sql/4.11[3446]:  port: '3306'
Feb 28 17:21:21 mod_sql/4.11[3446]:   ttl: '0'
Feb 28 17:21:21 mod_sql/4.11[3446]: exiting     mysql cmd_defineconnection
Feb 28 17:21:21 mod_sql/4.11[3446]: entering    mysql cmd_open
Feb 28 17:21:21 mod_sql/4.11[3446]: exiting     mysql cmd_open
Feb 28 17:21:21 mod_sql/4.11[3446]: unrecoverable backend error
Feb 28 17:21:21 mod_sql/4.11[3446]: error: '2002'
Feb 28 17:21:21 mod_sql/4.11[3446]: message: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)'


请高手指教一下,谢谢!!!

[ 本帖最后由 zhuaibing 于 2006-2-28 17:39 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2006-02-28 17:38 |只看该作者
数据库确认已经启动!附配置文件
ServerName      "ProFTPD Default Installation"
ServerType      standalone
ServerAdmin                     myunix@hotmail.com
DefaultServer      on
Port        21
Umask        022
#
MaxInstances      30
#
MaxLoginAttempts                5
#
User        nobody
Group        nobody
#
#
#   User        ftp
#   Group        ftp
#

AllowOverwrite on

#
MaxClients      100
#
DisplayLogin      welcome.msg
DisplayFirstChdir    .message
#
DisplayConnect /usr/local/proftpd/etc/connect.msg
DisplayGoAway /usr/local/proftpd/etc/goway.msg
#
DisplayQuit /usr/local/proftpd/etc/quit.msg
MaxHostsPerUser 1
MaxClientsPerUser 2

MaxClientsPerHost 1

RootLogin off
RequireValidShell off
UseReverseDNS     off
IdentLookups      off
TimeoutStalled    600
TimeoutLogin      900
TimeoutIdle       600
TimeoutNoTransfer 600

AllowForeignAddress on

PassivePorts 49152 65534

AllowStoreRestart      on
AllowRetrieveRestart   on

ServerIdent off

DefaultRoot ~ ftpgroup

#-------- load sql.mod for mysql authoritative --------#

SQLAuthTypes Backend Plaintext

SQLAuthenticate users* groups*

SQLConnectInfo ftpdb@localhost root
#
SQLUserInfo ftpuser userid passwd uid gid homedir shell
SQLGroupInfo ftpgroup groupname gid members
#
SQLHomedirOnDemand on
SQLNegativeCache   on
# Update count every time user logs in
SQLLogFile /var/log/proftpd.sql.log
SQLNamedQuery getcount SELECT "count from ftpuser where userid='%u'"
SQLNamedQuery getlastlogin SELECT "lastlogin from ftpuser where userid='%u'"
SQLNamedQuery updatelogininfo UPDATE "count=count+1,host='%h',lastlogin=current_timestamp() WHERE userid='%u'" ftpuser
SQLShowInfo PASS "230" "You've logged on %{getcount} times, last login at %{getlastlogin}"
SQLLog PASS updatelogininfo
#-------- load sql.mod for mysql authoritative --------#

#-------- load qudes.mod for Quota limit --------#
#
QuotaEngine on
#
QuotaDirectoryTally on
#
QuotaDisplayUnits Mb
#
QuotaShowQuotas on
#
QuotaLog "/var/log/proftpd.quota.log"
#
SQLNamedQuery get-quota-limit SELECT "name, quota_type, per_session, limit_type, bytes_in_avail, \
bytes_out_avail, bytes_xfer_avail, files_in_avail, files_out_avail, files_xfer_avail FROM ftpquotalimits \
WHERE name = '%{0}' AND quota_type = '%{1}'"
SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used, bytes_out_used, \
bytes_xfer_used, files_in_used, files_out_used, files_xfer_used FROM ftpquotatallies \
WHERE name = '%{0}' AND quota_type = '%{1}'"
SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, \
bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, \
files_in_used = files_in_used + %{3}, files_out_used = files_out_used + %{4}, \
files_xfer_used = files_xfer_used + %{5} \
WHERE name = '%{6}' AND quota_type = '%{7}'" ftpquotatallies
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}" ftpquotatallies
QuotaLimitTable sql:/get-quota-limit
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally
#--------- load qudes.mod for Quota limit --------#
# Logging options
# Debug Level
# emerg, alert, crit (empfohlen), error, warn. notice, info, debug
#
SyslogLevel emerg
SystemLog /var/log/proftpd.system.log
TransferLog /var/log/proftpd.xferlog
# Some logging formats
#
LogFormat default "%h %l %u %t "%r" %s %b"
LogFormat auth "%v [%P] %h %t "%r" %s"
LogFormat write "%h %l %u %t "%r" %s %b"
# Log file/dir access
# ExtendedLog /var/log/proftpd.access_log WRITE,READ write
# Record all logins
ExtendedLog /var/log/proftpd.auth_log AUTH auth
# Paranoia logging level....
ExtendedLog /var/log/proftpd.paranoid_log ALL default

论坛徽章:
0
3 [报告]
发表于 2006-03-01 09:34 |只看该作者
message: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)'

连接数据库的问题。如果数据库已经启动,那就检查一下my.ini里的设置,或试试用tcp的方式连接
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP