文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>MYSQL

MYSQL

时间:2006-04-25  来源:77902543

http://www.linuxsir.org/bbs/archive/index.php/t-15542.html http://www.linuxsir.org/main/?q=node/149 http://www.chinahtml.com/databases/3/2005/mysql-1127989646411.shtml http://www.21php.com/tutorial/tutorial.php?tid=100 http://windtear.net/archives/2003/12/09/000333.html
http://www.linuxdby.com/articlesdisplay.php?newsid=142
  mysqldump --database test > test.sql //将test库备份为test.sql文件.若没有加--database参数,恢复时必须创建test库.   mysql> show databases; 注:查看数据库都有哪些;
mysql> use proftpd; 注:要对proftpd 数据库进行操作,我们要先USE(用)proftpd数据库;
mysql> show tables; 注;我们在执行use proftpd;后,我们再查看proftpd中所有的表;
mysql> DESCRIBE ftpusers;我们要查看ftpusers 这个表的结构,我们要用到 DESCRIBE 这个指令,后面接表的名称
mysql> select * from ftpusers;我们看看ftpusers的表中,有哪些纪录; mysql> DELETE FROM ftpusers WHERE userid="test2";如果你想删除一个用户,您可以用 MySQL的delete 指令;比如我想删除test2这个用户 mysql> update ftpusers set passwd="aaasss" where userid="test";如果想更新一条用户纪录,比如test用户密码字段; alter table pet add column home char(20);  //在pet表中加入home列.   select * from pet order by name;   //查看pet全部信息,以name列的升序排列.使用order by name desc.是按降序排列 select * from pet where name like "b%";   //查看名称以b开头的.[%]相当于[*].[_]相当与[?].not like. select name,count(*) from pet group by name;  //统计各种name的出现频率     #<Global>
# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use.  It establishes a single server
# and a single anonymous login.  It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.
ServerName                      "The is MY FTP!"
ServerType                      standalone
DefaultServer                   on
# Port 21 is the standard FTP port.
Port                            21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask                           002
# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances                    30
# Set the user and group under which the server will run.
User                            ftp
Group                           nobody
# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
#DefaultRoot ~
# Normally, we want files to be overwriteable.
AllowOverwrite          on
MaxHostsPerUser 1 "Sorry,one user to one IP!"
MaxClientsPerUser 1 "Sorry,on user to on login!"
AllowRetrieveRestart on
RequireValidShell off
ServerIdent off
TransferRate STOR 100
TransferRate RETR 100
UseReverseDNS off
IdentLookups off
RootLogin off
MaxLoginAttempts 3
<Limit LOGIN>
Order deny,allow
#Deny from 192.168.0.
Allow from all
</Limit>
# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
  DenyAll
</Limit>
#</Global>
SQLAuthTypes Backend Plaintext
SQLConnectInfo proftpd@localhost test 123456
SQLUserInfo ftpusers userid passwd uid gid homedir shell
RequireValidShell off
SQLAuthenticate users
SQLHomedirOnDemand off

QuotaDirectoryTally on
QuotaDisplayUnits "Kb"
QuotaEngine on
QuotaLog "/usr/proftpd/var/quota"
QuotaShowQuotas on
SQLNamedQuery get-quota-limit SELECT "name, quota_type, per_session, limit_type, byteserials_in_avail,byteserials_out_avail, byteserials_xfer_avail, fileserials_in_avail, fileserials_out_avail, fileserials_xfer_avail FROM quotalimits WHERE name = '%{0}' AND quota_type = '%{1}'" SQLNamedQuery get-quota-tally SELECT "name, quota_type, byteserials_in_used, byteserials_out_used,byteserials_xfer_used, fileserials_in_used, fileserials_out_used, fileserials_xfer_used FROM quotatallies WHERE name = '%{0}' AND quota_type = '%{1}'" SQLNamedQuery update-quota-tally UPDATE "byteserials_in_used = byteserials_in_used + %{0},byteserials_out_used = byteserials_out_used + %{1}, byteserials_xfer_used = byteserials_xfer_used + %{2},fileserials_in_used = fileserials_in_used + %{3}, fileserials_out_used = fileserials_out_used + %{4}, fileserials_xfer_used = fileserials_xfer_used + %{5} WHERE name = '%{6}' AND quota_type = '%{7}'" quotatallies SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}" quotatallies QuotaLimitTable sql:/get-quota-limit
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally
    # A basic anonymous configuration, no upload directories.  If you do not
# want anonymous users, simply delete this entire <Anonymous> section.
<Anonymous /var/ftp>
  User                          ftp
  Group                         ftp
  # We want clients to be able to login with "anonymous" as well as "ftp"
  UserAlias                     anonymous ftp
  # Limit the maximum number of anonymous logins
  MaxClients                    10
  # We want 'welcome.msg' displayed at login, and '.message' displayed
  # in each newly chdired directory.
  DisplayLogin                  welcome.msg
  DisplayFirstChdir             .message
  # Limit WRITE everywhere in the anonymous chroot
<Limit WRITE>
AllowAll
</Limit>
</Anonymous>
相关阅读 更多 +
排行榜 更多 +
找茬脑洞的世界安卓版

找茬脑洞的世界安卓版

休闲益智 下载
滑板英雄跑酷2手游

滑板英雄跑酷2手游

休闲益智 下载
披萨对对看下载

披萨对对看下载

休闲益智 下载