Solved

How do I turn on remote access to MySQL on a Windows machine???

Posted on 2007-12-03
7
5,271 Views
Last Modified: 2012-05-05
I've got MySQL Server 5.0 installed on a Windows machine.  I remember when I installed it I was given the option to turn on remote connections and I didn't turn it on...thinking when I needed it it'd be very simple to enable.  However, I seem to finding otherwise.

I now need access to this server remotely and I can't for the life of me figure out how to do this.  All I can find is information on SSH to Linux and editing a config file located at this such and such location on Linux.  I can't find anything for Windows, though.

Any information on this would be greatly appreciated.  Thanks!
0
Comment
Question by:Andrew Angell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 50

Expert Comment

by:Steve Bink
ID: 20398101
Establishing a remote connection to MySQL is pretty transparent.  On the MySQL machine, make sure you have opened port 3306 (the default...use your port number if you selected a different one) in Windows Firewall, and that the port is being forwarded by your router/hardware firewall to that machine.  On the remote machine, simply use your server's IP:port for the connection.  

Inside MySQL, you'll need to set up the user permissions to allow access from a remote address.  If you're unfamiliar with MySQL user security, make sure you read these sections in the manual:

http://dev.mysql.com/doc/refman/5.0/en/privilege-system.html
http://dev.mysql.com/doc/refman/5.0/en/user-account-management.html
0
 
LVL 11

Author Comment

by:Andrew Angell
ID: 20398268
the ports and all of that I understand.  I've actually done this a bunch of times and I usually select the check box during MySQL installation to allow remote connections.  This one time I didn't and now I'm just trying to find a place that I can check that back on.  MySQL has no front-end, though, so that's where I'm stumped.

I am using Navicat MySQL but I don't see any options in here for enabling remote connections either.  when I go into Manage Users I see lots of check boxes but nothing about remote connections.  also, they're all checked.  
0
 
LVL 50

Expert Comment

by:Steve Bink
ID: 20398626
I don't know of any checkbox for remote connections, but I've only used MySQL on nix.  AFAIK, there's no special switch to allow for remote connections, but only configuration items to set it up.

What error are you receiving when you try to connect?
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 5

Accepted Solution

by:
ina_don earned 250 total points
ID: 20414408
You only need to enable your firewall and then create a user who has access from a remote machine.
To do this
open a command prompt;
go to the bin folder of your mysql installation. (Since you say you don't have a front end);
type mysql -u <username> -p [press enter]
enter password [press enter]
then to create the user (even for a user that already exists)
type -> grant all privileges on <databasename>.<object> to username@% identified by '<password>'; [press enter] (username@% means the selected username from any machine. normally a user will be created with username@localhost; databasename and object can be replaced with wildcards ie *.*)
type -> flush privileges; [press enter]
type -> logout or quit [press enter]
try logging on from a remote computer with the username that you used with the set password.
0
 
LVL 11

Author Comment

by:Andrew Angell
ID: 20414486
ina_don,

thanks for these instructions.  I do have Navicat that I can use but I don't see anything in its user configuration about remote connections.  Do you use Navicat?  Am I just not seeing it?
0
 
LVL 5

Expert Comment

by:ina_don
ID: 20421391
you should be able to do this in navicat...

Just download the Mentat Turbo Manager Free Edition or get SQLYog (http://www.webyog.com/en/) the interface should be easier. When you are creating a user just make sure where it says host (or new host when you are editing an existing user) you put % instead of localhost.

I've used Navicat before but I don't have it anymore so I don't remember what the interface looks like.
0
 
LVL 2

Expert Comment

by:dearvjkumar
ID: 20436720
login to the mysql in windows, and grand permission to some user like... grant usage on *.* to 'root@'remote linux IP' identify ('pass')

now try from linux machine (should have mysql client installed), eg. mysql -uroot -p -h<windows mysql IP> -Pport

It should connect..
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
Foreword This article was written many years ago, in the days when PHP supported the MySQL extension (http://php.net/manual/en/function.mysql-connect.php).  Today (http://php.net/manual/en/migration70.removed-exts-sapis.php) you would not use MySQL…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question