Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Posts
    110

    Unanswered: 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

  2. #2
    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

  3. #3
    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)

  4. #4
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •