Unable to connect PureFTP to a remote MySQL

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

  1. aberrio

    aberrio New Member

    Hello,

    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,

    AL
     
  2. falko

    falko Super Moderator ISPConfig Developer

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

    aberrio New Member

    Hello,

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

    Best Regards,

    Al
     
  4. falko

    falko Super Moderator ISPConfig Developer

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

    aberrio New Member

    Hi,

    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 ISPConfig Developer

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

    aberrio New Member

    Hello,

    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

    Regards,

    Al
     
  8. falko

    falko Super Moderator ISPConfig Developer

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

    aberrio New Member

    Hello

    THhx
     
  10. gabri231

    gabri231 New Member

    The same problem

    Hello!

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

    Code:
    
    root@web1:/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 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
    owners.
    
    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'@'192.168.1.61' to database 'preftpf'
    mysql> use preftpd
    ERROR 1044 (42000): Access denied for user 'pureftpd'@'192.168.1.61' 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)
    
    mysql>
    
    I dont know what is happening :(
     
  11. falko

    falko Super Moderator ISPConfig Developer

    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