letharion
asked on
Enable remote mysql access
I have set my.cnf to bind to my ip.
I have commented out "skip-networking"
I can't connect, it's probably something quite basic, because:
Zelda # telnet 192.168.0.35 3306
Trying 192.168.0.35...
Connected to 192.168.0.35.
Escape character is '^]'.
EHost '192.168.0.35' is not allowed to connect to this MySQL serverConnection closed by foreign host.
I have commented out "skip-networking"
I can't connect, it's probably something quite basic, because:
Zelda # telnet 192.168.0.35 3306
Trying 192.168.0.35...
Connected to 192.168.0.35.
Escape character is '^]'.
EHost '192.168.0.35' is not allowed to connect to this MySQL serverConnection closed by foreign host.
You have to explicityl allow a user to connect from a certain ip or "%" for all machines.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
mysql> select user, password, host from user where user ="letharion";
+-----------+------------- ---------- ---------- ---------- +--------- -----+
| user | password | host |
+-----------+------------- ---------- ---------- ---------- +--------- -----+
| letharion | *1F741C2CC5E5B34C1809CEC44 DF4AB62D3D 72BB2 | localhost |
| letharion | *1F741C2CC5E5B34C1809CEC44 DF4AB62D3D 72BB2 | 127.0.0.1 |
| letharion | *1F741C2CC5E5B34C1809CEC44 DF4AB62D3D 72BB2 | 192.168.0.35 |
I figured maybe I was rejected before this table was even read as I never gave a username.
Is anything wrong with this layout?
+-----------+-------------
| user | password | host |
+-----------+-------------
| letharion | *1F741C2CC5E5B34C1809CEC44
| letharion | *1F741C2CC5E5B34C1809CEC44
| letharion | *1F741C2CC5E5B34C1809CEC44
I figured maybe I was rejected before this table was even read as I never gave a username.
Is anything wrong with this layout?
Ähem ... the user is connecting TO a DB on 192.168.0.35, so you'd propably have to use the client's IP instead or use "%" for any host.
ASKER
>>Have you grant permission for user @ that host?
I could have sworn I had tried that, but I wanted to start from the beginning, so I just mentioned the telnet.
Could it have made a difference that I didn't use '' around the username?
That fixed it in any case. Thanks
I could have sworn I had tried that, but I wanted to start from the beginning, so I just mentioned the telnet.
Could it have made a difference that I didn't use '' around the username?
That fixed it in any case. Thanks
ASKER
>>Ähem ... the user is connecting TO a DB on 192.168.0.35, so you'd propably have to use the client's IP instead or use "%" for any host.
You're ofc correct. But I was trying locally first :)
The grant command fixed it locally, and I added the external ip and now that works too.
You're ofc correct. But I was trying locally first :)
The grant command fixed it locally, and I added the external ip and now that works too.
yes for sure
Could it have made a difference that I didn't use '' around the username? << yes for sure