php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8507 Can't connect to MySQL 3.22.32
Submitted: 2000-12-31 22:24 UTC Modified: 2001-03-09 21:23 UTC
From: info at widg dot com Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0.1pl2 OS: Linux adrian1.cobalt.com 2.2.14C
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: info at widg dot com
New email:
PHP Version: OS:

 

 [2000-12-31 22:24 UTC] info at widg dot com
I own a Cobalt Raq4 preinstalled with PHP Version 4.0.1pl2 and Chilisoft ASP. Chilisoft ASP will only work with Mysql 3.22.32. I am unable to connect to my databases using PHP 4.0.1 in MySQL 3.22.32.   phpinfo(); returns Mysql Client API version 3.23.10-alpha. The script I am using is as follows


<?php
     //connect
     
         $connection = mysql_connect("localhost","user","password") 
         or die ("Couldn't connect to server.");
     
     
     //select db
         
         $db = mysql_select_db("database", $connection) or die("Couldn't select database.");
     
     //create sql statement
         
         $sql = "SELECT * (tablename)";
         
     //execute sql query and get results    
         $sql_result = mysql_query($sql) or die("Couldn't execute query.");
         
     
     //results
     
         
         
    //format results by row
        
     
         while ($row = mysql_fetch_array($sql_result)) {
           $id = $row["id"];    //for every field copy this line and make it for that row.    
          

                  echo "the contents you want displayed";
                  echo "the contents you want displayed";

     }
     
     
     
 //close connection
     mysql_free_result($sql_result);
     mysql_close($connection);
 ?>

I have filled in all of the correct parameters and I got the following message. The script is cut from the page and the error message line matches up with the actual page.

Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket
               '/tmp/mysql.sock' (111) in /home/sites/site2/web/info.php on line 5
                                Couldn't connect to server.

Is this a bug or is there a way to make PHP  4.0.1pl2 connect to Mysql 3.22.32.

Any help would be greatly appreciated

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-02 08:51 UTC] sniper@php.net
I assume that mysqld is running?
Try reconfigure php to use the installed mysql instead
of the bundled client library.

1. Delete config.cache
2. Use --with-mysql=/path/to/mysql/install/dir
3. 'make clean ; make depend ; make ; make install'

Please report back whether this works for you or not.

--Jani
 [2001-03-09 21:23 UTC] sniper@php.net
No feedback. Old PHP version.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat May 10 22:01:26 2025 UTC