Let vsftpd virtual http://www.aliyun.com/zixun/aggregation/6579.html "> users use MySQL user authentication, you can conveniently in a machine with thousands of FTP accounts, You can use phpMyAdmin to manage your database.
Installing VSFTPD, MySQL, and phpMyAdmin
VSFTP does not have built-in MySQL support, so we must use PAM to authenticate:
sudo apt install vsftpd libpam-mysql mysql-server mysql-client
You will then ask the following questions:
New password for the MySQL "root" User: <--Yourrootsqlpassword
Repeat password for the MySQL "root" User: <--Yourrootsqlpassword
Web server to reconfigure automatically: <--apache2
Creating a MySQL Database
Now we create a database named VSFTPD and a MySQL account named VSFTPD (for the VSFTPD process connection VSFTPD database):
Mysql-u root-p
CREATE DATABASE vsftpd;
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP on vsftpd.* to ' vsftpd ' @ ' localhost ' identified by ' ftpdpass ';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP on vsftpd.* to ' vsftpd ' @ ' localhost.localdomain ' identified by ' Ftpdpass ' ;
FLUSH privileges;
Ftpdpass change to the password you want, and then create the table:
Use VSFTPD;
CREATE TABLE ' accounts ' (
' ID ' INT not NULL auto_increment PRIMARY KEY,
' username ' VARCHAR not NULL,
' Pass ' VARCHAR is not NULL,
UNIQUE (
' Username '
)
) ENGINE = MYISAM;
Quit;