?
Solved

How to set mySQL to only listen to localhost

Posted on 2005-04-14
4
Medium Priority
?
2,473 Views
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.
0
Comment
Question by:Adam Mason
4 Comments
 
LVL 20

Accepted Solution

by:
virmaior earned 160 total points
ID: 13783569
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.
0
 
LVL 1

Assisted Solution

by:NeonDevil
NeonDevil earned 240 total points
ID: 13783587
There's tons of tutorials all over the net.
http://www.analysisandsolutions.com/code/mybasic.htm

I also believe that there's instructions on the mysql manual as well
http://dev.mysql.com/doc/mysql/en/tutorial.html

to answer you other question, try something like this to connect to you database:
<?PHP
// Define Variables
$db="NameOfYourDatabase";
$username="UsernameThatYouSetUp";
$password="PasswordThatYouSetUp";

// 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());
?>


0
 
LVL 2

Expert Comment

by:Marvin_Carredo
ID: 13783691
i guess you need help of phpmyadmin  and do some lil configuration in config.inc.php
0
 

Author Comment

by:Adam Mason
ID: 13785171
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
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month17 days, 2 hours left to enroll

864 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