Unable to connect PureFTP to a remote MySQL

Discussion in 'Server Operation' started by aberrio, Oct 10, 2010.

  1. aberrio

    aberrio 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

    MYSQLServer xxx.xxx.xxx.xxx
    MYSQLSocket /var/run/mysql/mysql.sock
    MYSQLPort 3306
    MYSQLUser pureftpd
    MYSQLPassword ftpdpass
    MYSQLDatabase pureftpd

    is this possible to archive? I was able to do it locally but not connecting from another box.

    Kind regards,

  2. falko

    falko Super Moderator

    Please comment out or remove the
    MYSQLSocket /var/run/mysql/mysql.sock
    line and restart PureFTPd.
  3. aberrio

    aberrio New Member


    Any other suggestion? Did not work. The error was reported to the local box not to the mysql server.

    Best Regards,

  4. falko

    falko Super Moderator

    Can you connect to the remote MySQL server from the command line? Like
    mysql -h [I]remotehost[/I] -u [I]username[/I] -p
  5. aberrio

    aberrio New Member


    I do not have MySQL running locally. So, mysql command provide error. Reusuming I ca not connect from tht www server.
  6. falko

    falko Super Moderator

    That command is for connecting to a remote host.
  7. aberrio

    aberrio New Member


    This is what I am getting.

    www:~ # mysql -h xxx.xxx.xxx.xxx -u root -p
    If 'mysql' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf mysql


  8. falko

    falko Super Moderator

    You must install the MySQL client package on the system.
  9. aberrio

    aberrio New Member


  10. gabri231

    gabri231 New Member

    The same problem


    I have the same problem, but i can to connect with mysql-client.

    root@web1:/home/administrador# mysql -u pureftpd -p -h
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 108
    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
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    mysql> use preftpf
    ERROR 1044 (42000): Access denied for user 'pureftpd'@'' to database 'preftpf'
    mysql> use preftpd
    ERROR 1044 (42000): Access denied for user 'pureftpd'@'' to database 'preftpd'
    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)
    I dont know what is happening :(
  11. falko

    falko Super Moderator

    Does your server have more than one network interface? Maybe PureFTPd is trying to connect from the second network card and therefore from an IP for which no MySQL user is configured.

Share This Page