How to set mySQL to only listen to localhost

Posted on 2005-04-14
Last Modified: 2010-01-06
I am brand new to mySQL and can't seem to find a good tutorial.  I am setting up mysql for a phpBB forum and want mySQL to only listen on localhost.  How do I do that?  Thanks in advance.  I always get good answers here.
Question by:Adam Mason
    LVL 20

    Accepted Solution

    the default configuration for MySQL is usually set that way. (or if it's not the user profiles are at least set so that you can't login except on the localhost)

    unless your distribution came with phpBB or some other package, then this is already in place.
    LVL 1

    Assisted Solution

    There's tons of tutorials all over the net.

    I also believe that there's instructions on the mysql manual as well

    to answer you other question, try something like this to connect to you database:
    // Define Variables

    // Connect To Database
    $connect = mysql_connect("localhost",$username,$password);
    if (! $connect)
    die("Couldn't connect to MySQL");
    mysql_select_db($db , $connect)
    or die("Couldn't open $db: ".mysql_error());

    LVL 2

    Expert Comment

    i guess you need help of phpmyadmin  and do some lil configuration in

    Author Comment

    by:Adam Mason
    That's probably why I couldn't find how to set it.  I could find a few tutorials but they were "do this do this do this" with no explanation why.  And I didn't set up mySQL, someone else did, so I had no idea what they had already done

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    I have been using r1soft Continuous Data Protection ( for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
    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.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    737 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

    17 Experts available now in Live!

    Get 1:1 Help Now