473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

connection/permission problem

I have the following sitution...

MySQL version 3.23.47
PHP version 4.3.2
Redhat Linux version 7.1
Apache version 1.3.29

I have a MySQL user called 'user' that is set up with full rights for
localhost, 127.0.0.1, and the external IP address.

I can connect to the database using all three users from the command line...
../mysql --user=user --password=password --host=###.###.##.###
../mysql --user=user --password=password --host=127.0.0.1
../mysql --user=user --password=password --host=localhost

But in my php script running on the server, I can only connect using the
hostname localhost...
$DBConnection = mysql_connect("localhost","user","password");

the IP addresses don't work...
$DBConnection = mysql_connect("###.###.##.###","user","password");
$DBConnection = mysql_connect("127.0.0.1","user","password");

these give me the following error:
Warning: mysql_connect(): Can't connect to MySQL server on 'domain.com'
(111)

Is there anyone that's seen this and can point me in the right direction?

Thanks.
Jul 20 '05 #1
1 1351
I feel like quite the idiot... I specified the port # in the connection and
it works when using an IP address. Any insight into why localhost doesn't
need a port number, but an IP address does?

thanks.

"Bob Garbados" <bo*********@hotmail.com> wrote in message
news:10*************@corp.supernews.com...
I have the following sitution...

MySQL version 3.23.47
PHP version 4.3.2
Redhat Linux version 7.1
Apache version 1.3.29

I have a MySQL user called 'user' that is set up with full rights for
localhost, 127.0.0.1, and the external IP address.

I can connect to the database using all three users from the command line... ./mysql --user=user --password=password --host=###.###.##.###
./mysql --user=user --password=password --host=127.0.0.1
./mysql --user=user --password=password --host=localhost

But in my php script running on the server, I can only connect using the
hostname localhost...
$DBConnection = mysql_connect("localhost","user","password");

the IP addresses don't work...
$DBConnection = mysql_connect("###.###.##.###","user","password");
$DBConnection = mysql_connect("127.0.0.1","user","password");

these give me the following error:
Warning: mysql_connect(): Can't connect to MySQL server on 'domain.com'
(111)

Is there anyone that's seen this and can point me in the right direction?

Thanks.

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: SerGioGio | last post by:
Hello, I am going nuts. I am trying to connect to my local ORACLE instance using ODBC. It used to work few weeks ago, but it fails now. Connection with: - SQL*plus: connection works! -...
1
by: yma | last post by:
Hi, I tried to use a listbox to display a column in MS Access 2000 nwind.mdb by using ole DataAdapter, Connection and dataset controls. But I got "It is already opened exclusively by another...
6
by: RML | last post by:
Hi, I have an ASP.NET app which opens a MS Access database using the Het 4.0 OleDB provider. My development code abd database live on my D drive. Under .NET's Server Explorer I created a...
18
by: WStoreyII | last post by:
I am making a asp page that will run on my computer by iis. But the problem is the database in on a web server. I can not seem to get the connection to work for it though here his the connection...
5
by: Burton Roberts | last post by:
When using ASP.NET and an OleDBConnection control I get this error on CNN.Open: "The Microsoft Jet database engine cannot open the file 'C:\A2K\Backups\EdsBe2K.mdb'. It is already opened...
3
by: blue875 | last post by:
Ok, I've tried searching, and haven't found the answer, so it must mean everyone else but me already knows this. I have an Access 2000 form that I want to connect to an Access 2000 table in the...
0
by: Buddy Home | last post by:
Hello, I'm trying to upload a file programatically and occasionally I get the following error message. Unable to write data to the transport connection: An established connection was aborted...
3
by: Buddy Home | last post by:
Hello, I'm trying to upload a file programatically and occasionally I get the following error message. Unable to write data to the transport connection: An established connection was aborted...
2
by: dc | last post by:
I have a baffling connection problem from my C# console app to a sql server express database. The console application opens the sql database using the following code:- vDataSource = "server =...
9
by: Gordon | last post by:
I want to add a feature to a project I'm working on where i have multiple users set up on my Postgres database with varying levels of access. At the bare minimum there will be a login user who...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.