Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

remote access to my mysql server

Status
Not open for further replies.

ggggus

Programmer
Jul 5, 2003
114
I ran grant all privileges on *.* to 'root'@'%';

I've got two questions...
firstly, when I try to get to it from another machine on the local network it tells me access denied...

secondly, I'm on a soho network with a NAT router... what port/ports do I set up to access the mysql server from the outside?

***************************************
J. Jacobs
 
Is this:

grant all privileges on *.* to 'root'@'%'

The actual command you ran? If so, root doesn't need a password to connect. This is dangerous.


MySQL listens on port 3306. However, exposing any database server to the open internet is an extraordinarily dangerous thing to do.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
That is the actual command that I ran, but root was already a user and had a password already. I tested after I ran that command, and a password is still needed to connect.

***************************************
J. Jacobs
 
Actually, if you look in the user table in the mysql database, you will find that you have two users named root defined. Remember that a user is defined in MySQL by a username, a password, and a client host. You can have multiple users with the same name.

My own MySQL installation has a root user that can connect from localhost, and a root user that can connect from "10.%". The two users, as far as MySQL is concerned, are different -- there are two root user entries in my user table.

The problem is that you can end up defining multiple users which conflict in the user table.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top