Support » Plugin: External Login » Unable to login to external database

  • Resolved Chandra M

    (@nhuja)


    Hi,

    I am testing the external connection. My database is in digitalocean and I have done all the required things on there using this guide: https://www.digitalocean.com/community/tutorials/how-to-allow-remote-access-to-mysql

    Changed local ip to remote ip of the server, given all the privileges, flushed, restarted and all that but when I test a connection from the site hosted elsewhere I am getting this message.

    Host ‘rs09de.01cloud.com’ is not allowed to connect to this MySQL server

    I have add a rule with the site IP in the database server with this;
    sudo ufw allow from 138.201.233.18 to any port 3306

    I wonder what I have missed..

    Any help is appreciated. Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Chandra M

    (@nhuja)

    This might be a server issue. I cannot login with the sequel pro software as well.. everything on digitalocean seems correct but it still doesn’t connect. I will check and report later.

    Plugin Author tbenyon

    (@tbenyon)

    Hey Chandra,

    Sounds like it is. I can’t really help with this but it’s great your posting here as someone may help you, and if you do find a solution, I’m sure someone else may benefit 🙂

    As it’s not an issue with the plugin I’m going to mark this as resolved but would obviously appreciate you still sharing any progress in the thread 🙂

    Good luck 🙂

    Thread Starter Chandra M

    (@nhuja)

    Ok, I have tried everything and I cannot seem to connect still. A simple php script like this is also showing an error.

    <?php
    $dbServerName = "mydigitalocean_ip";
    $dbUsername = "xxxx";
    $dbPassword = "xxxx";
    $dbName = "xxxx";
    
    // create connection
    $conn = new mysqli($dbServerName, $dbUsername, $dbPassword, $dbName);
    
    // check connection
    if ($conn->connect_error) {
        die("Connection failed: " . $conn->connect_error);
    }
    echo "Connected successfully";
    

    The error is
    Connection failed: Host ‘rs09de.01cloud.com’ is not allowed to connect to this MySQL server

    Plugin Author tbenyon

    (@tbenyon)

    Hey @nhuja,

    I’m not familiar with Digital Ocean as I usually use AWS.

    Two thoughts.
    The first is I found this that might be worth a read:
    https://www.digitalocean.com/community/questions/remotely-connecting-to-mysql

    Also I know that their servers have configuration for Public Network Access which would been to be the case for your database but you may also need to add the hostname mentioned above to the “Inbound Rules” in the Firewall section. I know these exist for servers but have not used their DBs.

    Thread Starter Chandra M

    (@nhuja)

    I tried everything but didn’t work.. and decided to update the server and it worked. lol.. :S Anyways, thanks for your help. I am getting another error though. I will post another thread.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Unable to login to external database’ is closed to new replies.