Ubuntu Ϲ¹½¨»ùÓÚ mysql ¹ÜÀíµÄ pure ftpd
²ÎÕÕ : http://ubuntuing.javaeye.com/blog/65547
µÚ
Ò»²½£º°²×°pure-ftpdºÍpure-ftpd-mysql.
apt-get install pure-ftpd
apt-get
install pure-ftpd-mysql
µÚ¶þ²½£ºÐÞ¸Äpure-ftpdÁ´½ÓmysqlµÄÃÜÂë
vim
/etc/pure-ftpd/db/mysql.conf
ĬÈÏÅäÖãº
#MYSQLServer
localhost
#MYSQLPort 3306
MYSQLSocket
/tmp/mysql.sock
MYSQLUser root
MYSQLPassword
ÕâÀïÌîдÄãµÄÃÜÂë
MYSQLDatabase pureftpd
MYSQLCrypt
cleartext
MYSQLGetPW SELECT Password from users WHERE
User=”\L”
MYSQLGetUID SELECT Uid from users WHERE User=”\L”
MYSQLGetGID
SELECT Gid from users WHERE User=”\L”
MYSQLGetDir SELECT Dir
from users WHERE User=”\L”
µÚÈý²½´´½¨¹ÜÀíÊý¾Ý¿â£º
msyql -u root -p
Êä
ÈëmysqlÃÜÂë½øÈë
mysql>create database pureftpd;
mysql>use
pureftpd;
´´½¨users±í£º
CREATE TABLE users (
User
CHAR(32) BINARY NOT NULL,
Password CHAR(64) BINARY NOT NULL,
Uid
INT(11) NOT NULL default ‘-1′,
Gid INT(11) NOT NULL default
‘-1′,
Dir CHAR(256) BINARY NOT NULL,
PRIMARY KEY (User)
);
µÚ
ËIJ½:´´½¨Óû§¼°Ä¿Â¼
groupadd www
useradd -g www www
mkdir
-p Ŀ¼λÖà (±ÈÈçÎÒµÄÊÇ /da
ta)
chown -R www:www Ŀ¼λÖà (±ÈÈçÎÒµÄÊÇ /data)
Ȗ
È¡Óû§id¼°ËùÔÚ×éµÄ×éid
id www
½á¹û£ºuid=1001(www) gid=1001(www)
groups=1001(www)
½«Óû§Êý¾Ý²åÈëµ½Êý¾Ý¿âÓÃÒÔÑéÖ¤
insert into users
values(’www’,'123456′,1001,1001,’/data’);
¼¸¸öÖµ·Ö±ð¶ÔÓ¦ Óû§Ãû ÃÜÂë uid
gid ²Ù×÷Ŀ¼
µÚÎå²½£ºÖØÆôpure-ftpd
/etc/init.d/pure-ftpd restart
Õâ
ÑùÒ»À´,ÄãµÄ·þÎñÆ÷¾ÍÖ§³ÖftpÁË…
Ïà¹ØÎĵµ£º
ËùÓеÄÊýѧº¯ÊýÔÚÒ»¸ö³ö´íµÄÇé¿öÏ·µ»ØNULL¡£
-
µ¥Ä¿¼õ¡£¸Ä±ä²ÎÊýµÄ·ûºÅ¡£
mysql> select - 2;
×¢Ò⣬Èç¹ûÕâ¸ö²Ù×÷·ûÓëÒ»¸öBIGINTʹÓ㬷µ»ØÖµÊÇÒ»¸öBIGINT£¡ÕâÒâζ×ÅÄãÓ¦¸Ã±ÜÃâÔÚÕûÊýÉÏʹÓÃ-£¬ÄÇ¿ÉÄÜÓÐÖµ-2^63£¡
ABS(X)
·µ»ØXµÄ¾ø¶ÔÖµ¡£
mysql ......
ÒÑÖªµ±Ç°¼Ç¼idΪ$id,È¡³öµ±Ç°¼Ç¼µÄÉÏÒ»Ìõ¼Ç¼ºÍÏÂÒ»Ìõ¼Ç¼µÄid,title×ֶΡ£±íÃûnews¡£
$sql = "SELECT CASE WHEN SIGN(id - $id) > 0 THEN MIN(id) WHEN SIGN(id - $id) < 0 THEN MAX(id) END AS id,title from news WHERE id <> $id GROUP BY SIGN(id - $id) ORDER BY SIGN(id - $id)"; ......
²Ù×÷ϵͳ: windows xp
php°æ±¾:5.2.5 http://www.php.net/downloads.php
Apache http server °æ±¾:2.2.6http://httpd.apache.org/download.cgi
Mysql°æ±¾: 6.0.3http://dev.mysql.com/get/Downloads/MySQL-6.0
1.apacheµÄ°²×°:
1)Ë«»÷apache_2.2.6-win32-x86-no_ssl.msiͼ±ê£¬Æô¶¯apache°²×°³ÌÐò£»
2£©°²×°ÒÔÒ»¸ö»¶Ó ......
ÔÚmysqlÊÖ²áÀïÃæÓÐÒ»¶ÎÃèÊö¹ØÓÚlock tablesµÄÓï·¨µÄ.
LOCK TABLES tbl_name [AS alias] {READ [LOCAL] | [LOW_PRIORITY] WRITE} [, tbl_name [AS alias] {READ [LOCAL] | [LOW_PRIORITY] WRITE}] ...UNLOCK TABLESREAD
µ±±í²»´æÔÚ WRITE дËøʱ READ ¶ÁËø±»Ö´ÐÐ,Õâ¸Ã״̬ÏÂ,µ±Ç°Ïß³Ì ......
1.CMDÃüÁîÐÐÏÂÇл»µ½ mysql°²×°Ä¿Â¼ÏµÄbinĿ¼
ÀýÈç:cd D:\program\study\mysql\bin>
2. D:\program\study\mysql\bin> mysqldump -u Óû§Ãû -p Êý¾Ý¿âÃû > sqlÎļþ´æ·Å·¾¶ºÍÃû³Æ
D:\program\study\mysql\bin>mysqldump -u root -p oa > D:\oa.sql
3.ÊäÈëÃÜÂë
4.ÉÔ΢µÈ´ýƬ¿Ì(Êý¾Ý¿â½Ï´óµÈ´ýʱ¼ä¿ÉÄ ......