Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to make a remote mysql server on my computer. I know this isn't a wise thing to do, but I'm trying it out anyway. I'm not sure of the steps to complete here, but maybe someone can fill them in for me. First of all I have MySQL installed on my computer along with mysql admin. Then I have port 3306 port forwarded. When I login to my MySQL admin or query browser I login as localhost. Now I know there are more steps to this, since mysql is still not public. Can someone help me fill them in?

Ok guys, I can't find my my.cnf file anywhere! I've looked through MySQL Server 5.1 and all my MySQL directories but I can't find it. I don't even have an etc directory either...

share|improve this question

migrated from Oct 26 '09 at 6:49

This question came from our site for professional and enthusiast programmers.

geoff's answer is wholly inadequate for what you want to do (and not necessary if you just connect to your ip address). I'd know because I just set up my first db for remote access too! One thing that will need to be done is creating your my.cnf file (check documentation for its location based on your distribution and os). Mine looks like this:


# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
bind-address=""MY IP ADDRESS HERE""

prompt=(\\u@\\h) [\\d]>\\_


The important parts are the port (although I have the default port) and the bind address. The bind address listed would be your IP address. The commented out is the wild card of IP addresses.

Before you can connect to a mysql database you must give the user you are connecting with permissions to do so. Something like the following will get your started:

GRANT ALL PRIVILEGES ON *.* for 'root'@'%' IDENTIFIED BY 'db_passwd';

*.* is the databasename.tablename wildcard. 'root' can be any user. The '%' is the host wild card, but I strongly recommend only putting your IP address ('root'@''). Your pass word (if any) will be db_passwd, and include the single quotes when you execute the line. Type FLUSH PRIVILEGES to reload these new privileges.

I'd use a network monitor program to check if you are getting connected to your mysql server. Lets see how that goes. Further help can also be found by Googling "mysql network access" etc., that is how I got it to work.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.