1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Solved SQL No connection could be made because the target machine actively refused it

Discussion in 'Development' started by Levi, Mar 9, 2019.

  1. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    I use libasyqnl and this is my config.yml.
    I have a mysql user called "tom@%" with all permissions to it
    PHP:
    database:
      
    typemysql
      sqlite
    :
        
    fileplugins
      mysql
    :
        
    hostmy vps ip
        username
    tom
        password
    "mypassowrd"
        
    schemamydatabase
    worker
    -limit2
    I installed mysql on my ubuntu vps.
    I think my config is the problem because when i try it locally it works fine and I dont get error.
    The server and MySQL service s running.

    I get error

    Code:
    SQL CONNECT error: No connection could be made because the target machine actively refused it."
     
  2. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Check your firewall settings. Check if the MySQL server is opened to 0.0.0.0
     
  3. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    How do i check that
     
  4. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    ok i connected from my vps but now i cant seem to connect when i run it from my pc
     
  5. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    nevermind
     
  6. paulwings

    paulwings Creeper

    Messages:
    1
    This error is a network-related error occurred while establishing a connection to the Server. It means that the error is occurring because there is no server listening at the hostname and port you assigned. It happens that something is preventing a connection to the port or hostname. Either there is a firewall blocking the connection or the process that is hosting the service is not listening on that specific port. This may be because it is not running at all or because it is listening on a different port. So, no connection can be established. The solution to this problem is that connect to the same end point your server is listening on.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.