Solved

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

Posted on 2007-12-03
7
5,270 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
  • 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Introduction In this installment of my SQL tidbits, I will be looking at parsing Extensible Markup Language (XML) directly passed as string parameters to MySQL 5.1.5 or higher. These would be instances where LOAD_FILE (http://dev.mysql.com/doc/refm…
This guide whil teach how to setup live replication (database mirroring) on 2 servers for backup or other purposes. In our example situation we have this network schema (see atachment). We need to replicate EVERY executed SQL query on server 1 to…
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…

685 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