If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Connecting to a remote MySQL server

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-26-04, 02:26
divined divined is offline
Registered User
 
Join Date: Apr 2004
Posts: 110
Connecting to a remote MySQL server

Hello everybody

I`m trying to connect to a small MySQL database, installed on a machine on the local network. The MySQL server has some local users. I have written a front end VB program to access the database.
Unfortunately when I try to connect to the database (via the VB program) from a machine, other than the one running MySQL, I get a 'Access denied for user xxxx' error.
Do I need to make those users remote and how can I do that?

thx, in advance

George Papadopoulos
Reply With Quote
  #2 (permalink)  
Old 07-26-04, 15:40
Steve T. Steve T. is offline
Registered User
 
Join Date: Sep 2003
Location: So. Cal. USA
Posts: 142
Hi, George! I believe you have to admin access on the MySQL server to do this. On our server, we create db's for our users but restrict privileges to localhost. One of our users wanted to pass data to the MySQL db from another web server that did not have MySQL. We were able to change that user's privileges for that specific db to allow access from that only that other server. We did it all with phpMyAdmin.
--ST
Reply With Quote
  #3 (permalink)  
Old 07-26-04, 18:44
ServerMetrics ServerMetrics is offline
Registered User
 
Join Date: May 2004
Posts: 45
Access to MySQL can be granted from the host only, a specific set of hosts, or from any host on the network - depending on how the administrator granted the user privileges. It sounds like the privileges granted to your users were local only. The administrator should grant permissions from a specific box like;

grant all on *.* to fred@freds_pc identified by 'freds_password';

This will limit the fred account access only from the fred_pc machine. If you want to grant fred permission from any machine then;

grant all on *.* to fred@'%' identified by 'freds_password';

Either will get you remote access, obviously the more security-minded can choose the former.

Hope this helps
__________________
Keith Brownlow
ServerMetrics DB Monitoring (www.servermetrics.com)
Reply With Quote
  #4 (permalink)  
Old 07-27-04, 01:30
divined divined is offline
Registered User
 
Join Date: Apr 2004
Posts: 110
It seems that the problem was not that users were restricted to local access only. The problem was that the database used was new and the users had no privileges at all on that database.

thx, to all for their assistance
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On