(originally posted this as an issue, and that probably wasn't the right place)
(thanks for ANY help)

mademarest - September 10, 2006 - 10:36
Project: Drupal
Version: 4.7.3
Component: mysql database
Category: support
Priority: normal
Assigned: Unassigned
Status: active

Description

argh. I've been racking my brain for 3 days with this, and would GREATLY APPRECIATE any help!

Mac OS X 10.4.7
Personal Web Sharing: on
PHP: started
mySQL: loaded

Drupal in: WebServer/Documents
phpMyAdmin-2.8.2.4 in: WebServer/Documents

when I pull up: WebServer/phpMyAdmin-2.8.2.4/index.php

i get:

Firefox can't find the file at /Library/WebServer/Documents/phpMyAdmin-2.8.2.4/left.php
<?php
 echo $url_query; 
?>

I have my site hosted with SiteGround.com

That all is working fine!

But...I want a local dev/test environment on my box for theme and content creation, etc.

please help
thanks!
- Mark

Updates
#1 submitted by mademarest on September 10, 2006 - 12:47
Title: ADD'L INFO: newbie needs help: mySQL, phpMyAdmin, Drupal

also...

running:

mysql-standard-4.1.21-apple-darwin8.6.0-poewrpc (in: /usr/local/)

drupal 4.7 (in: /WebServer/Documents/drupal/)

...and when I try to pull up Drupal in FF I get a splash screen with the following error:

The MySQL error was: Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2).

thanks, all.

Comments

white-raven’s picture

Please note that I do not have a lot of experience working with Apple Computers as local servers.

That being said, to deal with the first problem, the first thing I'd do is manually check to see whether that missing file exists. Open a terminal:

# cd /Library/WebServer/Documents/phpMyAdmin-2.8.2.4/
# ls

A listing of files in that directory will be output. Is left.php there? If you have an error changing to that directory, then you probably have phpMyAdmin installed somewhere else, which is a different problem. If you don't see left.php, maybe it's in another folder and PHPMyAdmin is looking for it in the wrong place. Try

# cd /Library/WebServer/Documents
# find . | grep left

This will look through all the subdirectories of your current directory and search for files that contain the word "left" in the file name.

If it appears PHPMyAdmin is installed, but left.php is missing, I recommend downloading a copy of PHPMyAdmin, extracting it, and copying left.php into its rightful location. If PHPMyAdmin isn't installed where you thought, you can always download, extract, and install a new copy. Hope one of those works.

As for your problem with Drupal, it looks like MySQL isn't running, even though you think it is. I assume OS X comes with a copy of the commandline MySQL client. Try this:

# mysql -u root
or

# mysql -u root -p
[[[enter your MySQL server root password]]]

If you get an error that you cannot connect to to local host (it may say something about /var/mysql/mysql.sock again), then MySQL Server is probably not running. Try (re)starting it. If you can connect, but Drupal can't, your MySQL socket file may be somewhere other than in /var/mysql. Try:

# cd /var/mysql
# ls

Is there a .sock file in there? If not, try:

# updatedb && locate "mysql.sock"

This will output files named "mysql.sock" after updating your locate database. If you find mysql.sock somewhere else, you may have to reconfigure your web server and/or Drupal. What web server does Mac OS X use? Not Apache? If this reconfiguration is required, you may need someone else to help you from there.

Hope that helps!

-- White Raven