Unable to connect PureFTP to a remote MySQL

Discussion in 'Server Operation' started by gabri231, Jun 4, 2013.

  1. gabri231

    gabri231 New Member

    I did followed the instruction in here....

    Virtual Hosting With PureFTPd And MySQL (Incl. Quota And Bandwidth Management) On OpenSUSE 11.2

    but pureftpd is not able to connect to my MySQL Box. My MySQL server is in different server so I modified the pureftd conf files as follow.

    #cat /etc/pure-ftpd/db/mysql.conf
    #MYSQLSocket /var/run/mysqld/mysqld.sock
    MYSQLServer 192.168.1.62
    MYSQLPort 3306
    MYSQLUser pureftpd
    MYSQLPassword ftpdpass
    MYSQLDatabase pureftpd
    #MYSQLCrypt md5, cleartext, crypt() or password() - md5 is VERY RECOMMENDABLE uppon cleartext
    MYSQLCrypt md5
    MYSQLGetPW SELECT Password FROM ftpd WHERE User="\L" AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
    MYSQLGetUID SELECT Uid FROM ftpd WHERE User="\L" AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
    MYSQLGetGID SELECT Gid FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
    MYSQLGetDir SELECT Dir FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
    MySQLGetBandwidthUL SELECT ULBandwidth FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
    MySQLGetBandwidthDL SELECT DLBandwidth FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
    MySQLGetQTASZ SELECT QuotaSize FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
    MySQLGetQTAFS SELECT QuotaFiles FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")



    # mysql -u pureftpd -p -h 192.168.1.62
    Enter password:
    ERROR 1045 (28000): Access denied for user 'pureftpd'@'mysql' (using password: YES)
    [email protected]:/home/administrador# mysql -u pureftpd -p -h 192.168.1.62
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 99
    Server version: 5.5.31-0ubuntu0.12.04.2 (Ubuntu)

    Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    mysql> use pureftpd
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A

    Database changed
    mysql> show tables
    -> ;
    +--------------------+
    | Tables_in_pureftpd |
    +--------------------+
    | ftpd |
    +--------------------+
    1 row in set (0.00 sec)

    mysql>


    I dont know what is happening :(
    Can somebody helpme please, i searched so time :(
     
  2. gabri231

    gabri231 New Member

    OK!! the problem was solved

    I didn't connect with a ftp client program, because the users were not created.

    If you create a user, to see /home/userftp you must login with ftp to create the personal directory.

    Thanks and sorry for my english :)
     

Share This Page