+ Post New Thread
Results 1 to 6 of 6
*nix Thread, MySQL Network access in Technical; Have been playing with a LAMP setup learning a bit of php. Now i want to add data to a ...
  1. #1

    Join Date
    Jun 2005
    Posts
    223
    Thank Post
    6
    Thanked 8 Times in 8 Posts
    Rep Power
    30

    MySQL Network access

    Have been playing with a LAMP setup learning a bit of php. Now i want to add data to a database from another machine. MySQL is running, and listening on port 3306, if i telnet to it from the box using 'localhost' i get a reply. However i can't get at it using it's IP from this or any other machine. I'm guessing i need to add an iptables rule to open up the port or something? Can anyone confirm that this is the case and give me a hint on how i go about it?
    TIA

  2. #2

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,842
    Thank Post
    110
    Thanked 592 Times in 513 Posts
    Blog Entries
    1
    Rep Power
    226

    Re: MySQL Network access

    Check the access rules for the user your attempting to connect to mysql with. It's probably set to only allow access to localhost.

    Easiest way to fix it is with phpmyadmin rather than mysqladmin (if you have it). Also you should allow access only on a per host basis (rather than anywhere) if possible, for security.

  3. #3

    Join Date
    Jun 2005
    Posts
    223
    Thank Post
    6
    Thanked 8 Times in 8 Posts
    Rep Power
    30

    Re: MySQL Network access

    Hmm... it was set to only access from localhost however changing it didn't solve the problem. Even before authentication the port doesn't appear to accessable though so there's something stopping it getting even that far.

  4. #4

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,842
    Thank Post
    110
    Thanked 592 Times in 513 Posts
    Blog Entries
    1
    Rep Power
    226

    Re: MySQL Network access

    If you set the host to '%' then that means anywhere. It will rule it out as being the cause. Obviously this isn't very secure though.

  5. #5

    Join Date
    Jun 2005
    Posts
    223
    Thank Post
    6
    Thanked 8 Times in 8 Posts
    Rep Power
    30

    Re: MySQL Network access

    Ah got it. I had forgotten to set the bind address in my.cnf. It defaults to 127.0.0.1. Thanks anyway Geoff.


  6. #6

    Join Date
    Nov 2005
    Location
    Middlesbrough
    Posts
    402
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: MySQL Network access

    You beat me to it, i left it as 127.0.0.1 and it had me for ages, setting it to 0.0.0.0 solved it!



SHARE:
+ Post New Thread

Similar Threads

  1. Moodle + Access network Shares
    By darknova in forum Virtual Learning Platforms
    Replies: 4
    Last Post: 28th November 2007, 04:55 PM
  2. Network Access Control Solutions
    By Simcfc73 in forum Network and Classroom Management
    Replies: 5
    Last Post: 23rd October 2007, 02:37 PM
  3. Replies: 2
    Last Post: 7th December 2006, 11:08 AM
  4. Access DB to MySQL
    By Gatt in forum Web Development
    Replies: 3
    Last Post: 29th November 2006, 11:32 PM
  5. Access Denied from Admin Network
    By MrDylan in forum ICT KS3 SATS Tests
    Replies: 9
    Last Post: 25th April 2006, 01:09 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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