MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old February 24th, 2000, 01:04 PM
stwong stwong is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Location: HK
Posts: 1 stwong User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to stwong
I have install the above on my pc
mysql works fine on mysql>prompt and php runs fine with apahce as DSO module.
However, when I have the following code in test.phtml :

mysql_connect("localhost","webuser","");

I have the following response:

Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/httpd/html/test.phtml on line 5

I cannot understand why. Since it is urgent to establish the combination, would any one pls give me a way to solve or a good way to install all above so that everything goes fine?

Further, I have checked the mysql.sock belongs mysql user and group. When I change to root, there is no change .

Thanks in advance

------------------
ST WONG

Reply With Quote
  #2  
Old February 24th, 2000, 03:41 PM
TroutMask TroutMask is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Location: Englewood, CO
Posts: 30 TroutMask User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
My guess is that your default mysqld socket is either not 3306 or your connect needs to include the port number. Since you can connect via >mysql, your mysqld port is probably set to 3306, so it's probably your client port setting which isn't working. Maybe try this: "localhost:3306".

You can find out mysqld's port by using: mysqladmin variables

a guess...

-TM

Reply With Quote
  #3  
Old February 24th, 2000, 08:46 PM
tom.welsh tom.welsh is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Location: Herndon, VA
Posts: 1 tom.welsh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have come across this as well. I'm not quite sure why but I fix it by using the actual hostname instead of localhost. Sounds odd but works. If anyone knows why I'd be interested in some insight as well.

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by stwong:
I have install the above on my pc
mysql works fine on mysql>prompt and php runs fine with apahce as DSO module.
However, when I have the following code in test.phtml :

mysql_connect("localhost","webuser","");

I have the following response:

Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/httpd/html/test.phtml on line 5

I cannot understand why. Since it is urgent to establish the combination, would any one pls give me a way to solve or a good way to install all above so that everything goes fine?

Further, I have checked the mysql.sock belongs mysql user and group. When I change to root, there is no change .

Thanks in advance

[/quote]


Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > MySQL, PHP APACHE RedHat Linux6.1


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway