Solved

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

Posted on 2007-12-03
7
5,266 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
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Creating and Managing Databases with phpMyAdmin in cPanel.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now