#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    3
    Rep Power
    0

    Connection refused


    Sorry for my totally green question:
    I'm trying to connect to my MySQL database from another host but it fails, so I thought i'd see if MySQL is responding at all:

    $ telnet my_mysql_host 3306
    Trying xxx.xxx.xxx.xxx...
    telnet: Unable to connect to remote host: Connection refused

    Ok, so I've disabled telnet connections, which is a good thing

    So how do I open this port for specific hosts?
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Location
    aaaaaa
    Posts
    26
    Rep Power
    0
    that's because you're trying to connect to your mysql db from another host.


    on your mysql server do

    mysql -u root

    then add a row for root with hostname = to %

    % means from anywhere so now you can log from anywhere and not only localhost
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    3
    Rep Power
    0
    I must be a total idiot, i can't get this thing to work.

    Ok, MySQL is listening and anwering now!
    But i can't connect! All I get is:
    Host '213.114.155.18' is not allowed to connect to this MySQL server

    Here's what i did:
    GRANT ALL PRIVILEGES ON medter.* TO 'sekreren'@'213.114.155.%' IDENTIFIED BY PASSWORD '********';
    FLUSH PRIVILEGES;

    What is wrong?

IMN logo majestic logo threadwatch logo seochat tools logo