Solved

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

Posted on 2007-12-03
7
5,272 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 51

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 51

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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

617 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