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.
LVL 6
letharionAsked:
Who is Participating?
 
theGhost_k8Database ConsultantCommented:
Have you grant permission for user @ that host?
GRANT ALL ON DBNAME.*  TO  'user'@'192.168.0.35'  IDENTIFIED BY 'PASSWORD';
0
 
ChristoferDutzCommented:
You have to explicityl allow a user to connect from a certain ip or "%" for all machines.
0
 
letharionAuthor Commented:
mysql> select user, password, host from user where user ="letharion";
+-----------+-------------------------------------------+--------------+
| user      | password                                  | host         |
+-----------+-------------------------------------------+--------------+
| letharion | *1F741C2CC5E5B34C1809CEC44DF4AB62D3D72BB2 | localhost    |
| letharion | *1F741C2CC5E5B34C1809CEC44DF4AB62D3D72BB2 | 127.0.0.1    |
| letharion | *1F741C2CC5E5B34C1809CEC44DF4AB62D3D72BB2 | 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?
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
ChristoferDutzCommented:
Ä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.
0
 
letharionAuthor Commented:
>>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
0
 
letharionAuthor Commented:
>>Ä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.
0
 
theGhost_k8Database ConsultantCommented:
yes for sure
0
 
theGhost_k8Database ConsultantCommented:
Could it have made a difference that I didn't use '' around the username? << yes for sure
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.