MySQL Forums
Forum List  »  Install & Repo

Leopard Install... Can connect but not through PHP.
Posted by: Keil Miller Jr
Date: November 08, 2007 08:35PM

I installed the package Mysql 5.045 on leopard os 10.5.
Heres what I did so far:

Copied file /private/etc/php.ini.default to create file /private/etc/php.ini

Edited all instances of the following in /private/etc/php.ini:
mysql.default_socket =
mysql.default_socket = /private/tmp/mysql.sock
mysqli.default_socket =
mysqli.default_socket = /private/tmp/mysql.sock

I started mysql. I can connect to the database using the terminal or say the mysql admin or query browser. All beginning databases are there.

When I try to connect to it using a php page (is enabled), it does not work. The following is the code I tried to access one of my databases I recovered.


@ $db = new mysqli('localhost', 'keil', 'password', 'keilmiller');
if (mysqli_connect_errno()) {
echo '<p>Error: Could not connect to database.</p>';
else {
echo '<p>Connected to database</p>';


Any help would be appreciated. I would hate to have to revert back to tiger for my job.

Macbook running the stock Apache and PHP build, and kinda running mysql 5.045.

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.