Page 1 of 1

How i allow other people connect MySQL Database?

PostPosted: 23. April 2007 11:18
by FunnyMaker
How i allow other people connect MySQL Database?
I make online game and i need that people could connect to database! :D

PostPosted: 23. April 2007 15:57
by maxnorris
Well, if they're on the same network, you just need to edit the permissions. For example, you can have a username at localhost, then you can add the same username from a different host name. (You can allow any host too)

If you're doing this over the internet, you'll need to allow the SQL connection through your firewall. Ummm errrr port 3309 if I recall? I'd Google that to be sure, haven't had coffee yet.

Just note that doing either of those is really opening you up to security holes, especially allowing internet access to your database server.

Edit: Double checked, I was close, 3306. Still a bad idea though. If you're making an online game, that should be entirely handled by the server. There's no reason a game client should ever access the database directly.

PostPosted: 28. April 2007 20:12
by FunnyMaker
maxnorris wrote:Well, if they're on the same network, you just need to edit the permissions. For example, you can have a username at localhost, then you can add the same username from a different host name. (You can allow any host too)

If you're doing this over the internet, you'll need to allow the SQL connection through your firewall. Ummm errrr port 3309 if I recall? I'd Google that to be sure, haven't had coffee yet.

Just note that doing either of those is really opening you up to security holes, especially allowing internet access to your database server.

Edit: Double checked, I was close, 3306. Still a bad idea though. If you're making an online game, that should be entirely handled by the server. There's no reason a game client should ever access the database directly.

If a bad idea then i will use http://www.freesql.org/... :o

PostPosted: 29. April 2007 23:52
by ldivinag
can you describe HOW THE user will be using the db?

if through the game, then let your own software handle the connections.

that way, they dont have a direct way of manipulating the data, which can open up tons of security issues.

PostPosted: 23. May 2007 20:24
by FunnyMaker
ldivinag wrote:can you describe HOW THE user will be using the db?

if through the game, then let your own software handle the connections.

that way, they dont have a direct way of manipulating the data, which can open up tons of security issues.

How can i?
It says MyIP is not allowed to connect. :(

PostPosted: 23. May 2007 23:05
by Makuro
What did you configure for allowed host for the username?

when you create a new user, you got the option to enter a host from which the user is allowed to connect.

for this you got several options.

1st localhost
means the user is only allowed to connect from the localhost e.g. webinterfaces, bash, etc
2nd 192.168.1.1
means the user is only allowed to connect from this one IP address and not from any else
3rd %
means the user can access from anywhere
4th domain.dyndns.org
means the user can access from the domain and its ip

now the question, what did you configure if you created the user ? :)

PostPosted: 24. May 2007 11:26
by FunnyMaker
What happens if i forgot my username and password? How i can remind it? Does there any file/folder?
Because i'm not remember i change the password/username.

PostPosted: 25. May 2007 23:12
by FunnyMaker
Makuro wrote:What did you configure for allowed host for the username?

when you create a new user, you got the option to enter a host from which the user is allowed to connect.

for this you got several options.

1st localhost
means the user is only allowed to connect from the localhost e.g. webinterfaces, bash, etc
2nd 192.168.1.1
means the user is only allowed to connect from this one IP address and not from any else
3rd %
means the user can access from anywhere
4th domain.dyndns.org
means the user can access from the domain and its ip

now the question, what did you configure if you created the user ? :)

I choose %. :)
But i still can't connect. :( What problem is now?