Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Problems with mysql

Problems with mysql
Thread Tools
Fresh-Faced Recruit
Join Date: Dec 2007
Status: Offline
Reply With Quote
Dec 2, 2007, 10:29 AM
 
Hi people,

I installed MySQL, Apache, PHP, and XAMPP. I fired up XAMPP and clicked start everything, and, MySQL isnt running! (PHP is, version 5.2.4) It says:

XAMPP: Starting MySQL...
/Applications/xampp/xamppfiles/bin/mysql.server: line 159: kill: (790) - No such process

and when I click on reload on xampp, it says mysql isnt running.

What does this mean please? Please help!

Thanks,

Bilal.:
(Last edited by scorpionbilli; Dec 2, 2007 at 12:35 PM )
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Dec 2, 2007, 12:47 PM
 
What happens when you try to startup the MySQL server by hand?

sudo /Applications/xampp/xamppfiles/bin/mysql.server start

If you are looking for an easy binary install, there is MAMP which some people seem to like. I've always used Macports myself...
     
Fresh-Faced Recruit
Join Date: Dec 2007
Status: Offline
Reply With Quote
Dec 2, 2007, 01:00 PM
 
hi, thanks for the reply!

Ive got all the components of MAMP downloaded and installed and I want to make my mysql simply work

How do I do what youve asked? do I go to Terminal? Im a complete novice so need a guide, sorry!
     
Fresh-Faced Recruit
Join Date: Jan 2008
Status: Offline
Reply With Quote
Jan 20, 2008, 09:36 PM
 
sh-3.2# mysqladmin version
sh: mysqladmin: command not found
sh-3.2# sudo /Applications/xampp/xamppfiles/bin/mysql.server start
Starting MySQL
../Applications/xampp/xamppfiles/bin/mysql.server: line 159: kill: (2287) - No such process
ERROR!
sh-3.2#
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jan 20, 2008, 10:49 PM
 
I have no idea what is going on with this xampp thing, I would suggest just using the stock mysql.com provided MySQL, or else build it yourself using Macports.
     
Forum Regular
Join Date: May 2001
Location: Sierra Nevada Country
Status: Offline
Reply With Quote
Jan 22, 2008, 11:32 PM
 
If you're running MySQL and PHP under Leopard, be prepared to jump through hoops to get it going.

This is the 'basic' processs to get MySQL 5.0.45 running on Leopard.

1. Install the 5.0.45 package for OSX from mysql.com
2. Open the terminal and change ownership of all the files inside the /usr/local/mysql folder to _mysql:wheel. The terminal command would be "cd /usr/local/mysql; sudo chown -R _mysql:wheel *" (without the quotes). Then type in your password when prompted.
3. Next, go to /etc/apache2 ("cd /etc/apache2" in Terminal). Then you'll want to open the httpd.conf file as an admin user ("sudo pico httpd.conf"). Now you'll want to uncomment the line that says "LoadModule php5_module libexec/apache2/libphp5.so". I find it's easiest to find it by typing 'Ctrl-W' (Where Is?) and then typing 'libphp' and press Return. Just remove the '#' character at the beginning of the line and save the file ('Ctrl-X', answer yes when prompted). You'll have to restart the webserver if you're using the /Library/Webserver directory, or restart Personal Web Sharing if you're using your ~/Sites directory.
4. Now we have to get PHP and MySQL to communicate with each other. Unfortunately Apple's default PHP install looks for the MySQL socket in /var/mysql/ rather than in the /tmp directory where it actually resides. So, what you need to do is create a symbolic link between the two locations so that PHP and MySQL will be happy.
This is also done in the Terminal, by first changing to the /var directory, creating the mysql directory, then creating the socket link inside the directory.
In Terminal-speak: "cd /var; sudo mkdir mysql; cd mysql; sudo ln -s /tmp/mysql.sock ." (once again without quotes. DON'T forget the period after mysql.sock... this tells the terminal shell to create the link in 'this' directory.
5. Now, the final thing is to create a LaunchDaemon for mysql, since MySQL won't auto-start using the Preference Pane under Leopard. Just create a text file with the following text in it:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs$
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.mysql.mysqld</string>
<key>Program</key>
<string>/usr/local/mysql/bin/mysqld_safe</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>

Save it as "com.mysql.mysqld.plist". Drag it to /Library/LaunchDaemons and enter your admin password if prompted. You also want to make sure that the plist file is owned by root, so change to the /Library/LaunchDaemons directory in the Terminal (cd /Library/LaunchDaemons), then type "sudo chown root:wheel com.mysql.mysqld.plist". Now MySQL should start up automatically on reboot.

Now you just have to create the root password for the MySQL installation. This Link should help you get that taken care of.

I've found the easiest way to make sure that PHP/MySQL are installed correctly is to download and install PHPMyAdmin in your Sites folder (the url of the install would be something like "http://127.0.0.1/~yourusername/phpMyAdmin/index.php"). Follow the configuration steps in the Read Me files that come with it, and you should be good to go.

Are you scared yet?
First there was man, then there was Macintosh
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jan 22, 2008, 11:50 PM
 
Or:

1) Install Ubuntu in a virtual machine

2) Open Synaptic and install MySQL and PHP, or:

sudo apt-get install php
sudo apt-get install mysql

3) There is no step 3
     
Fresh-Faced Recruit
Join Date: Apr 2008
Status: Offline
Reply With Quote
Apr 29, 2008, 06:02 PM
 
The error with line 159 on it is usually because you have a previous MySQL instance running. You need to kill that before Xampp will work properly.

This does the trick in a brute force kinda way:
Code:
sudo killall mysqld
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 05:40 AM.
All contents of these forums © 1995-2008 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.7.2 © 2000-2008, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.2.0 RC8