Problems with mysql

Discussion in 'Web Design and Development' started by scorpionbilli, Dec 2, 2007.

  1. scorpionbilli macrumors newbie

    Joined:
    Nov 17, 2007
    Location:
    English expat in Frankfurt am Main, Germany
    #1
    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

    What does this mean please? Please help!

    Thanks,

    Bilal.:(
     
  2. bigandy macrumors G3

    bigandy

    Joined:
    Apr 30, 2004
    Location:
    Murka
    #2
    You mentioned you'd installed MySQL first. If your MySQL, Apache and PHP installs are working fine, there's no need for XAMPP (XAMPP is an integrated package with Apache, PHP, MySQL and a few others built in. If you have any of the major components already, it can conflict).

    Did you install Apache specifically, or are you using the Apache that comes with Mac OS X?

    I find the best way to get going with web development on the Mac is do do the following:

    1. Enable the built in Apache via System Preferences > Sharing > Web

    2. Download & Install Marc Liyanage's PHP for Mac OS X

    3. Download & Install MySQL

    This leaves you with a fine set up, with documents for http://yourmac/ residing in /Library/WebServer/Documents/ and your user Sites folder appearing at http://yourip/~username/
     
  3. scorpionbilli thread starter macrumors newbie

    Joined:
    Nov 17, 2007
    Location:
    English expat in Frankfurt am Main, Germany
    #3
    hi,

    I did all those things before, well, I enabled PHP on my mac along with apache, dowloaded mysql from their official website, and then downloaded xampp.

    All I was doing was following what the book I am using "Learning PHP and MySQL" O'Reilly, was telling me to do!

    So whats going wrong with mysql please? how do I check if its working?
     
  4. scorpionbilli thread starter macrumors newbie

    Joined:
    Nov 17, 2007
    Location:
    English expat in Frankfurt am Main, Germany
    #4
    and when I click on reload on xampp, it says mysql isnt running.
     
  5. bigandy macrumors G3

    bigandy

    Joined:
    Apr 30, 2004
    Location:
    Murka
    #5
    If you've got the bits I mentioned (including the Entropy PHP package) installed, it's probably a good idea to forget about XAMPP...


    To tell if mysql is running, open Terminal.app (/Applications/Utilities/Terminal.app), and issue the following command:

    Code:
    mysqladmin version
    If that brings up version information about mysql, you're fine and can get on with the tutorials, because MySQL is there and running. For example, one of my test servers returns the following:

    Code:
    #mysqladmin version
    mysqladmin  Ver 8.41 Distrib 4.1.22, for pc-linux-gnu on i686
    Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
    This software comes with ABSOLUTELY NO WARRANTY. This is free software,
    and you are welcome to modify and redistribute it under the GPL license
    
    Server version		4.1.22-standard
    Protocol version	10
    Connection		Localhost via UNIX socket
    UNIX socket		/var/lib/mysql/mysql.sock
    Uptime:			9 hours 42 min 41 sec
    
    Threads: 17  Questions: 4700  Slow queries: 0  Opens: 30  Flush tables: 1  Open tables: 24  Queries per second avg: 0.134
    If it's not running (no info is returned), you'll get something like this returned:

    Code:
    #mysqladmin version
    mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
    Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!

    So yeah, as I said, if MySQL appears to be running from that, ignore XAMPP. XAMPP is great if you've got nothing installed and running yet, and I'm sure at this stage you don't want to be running the XAMPP MySQL distribution on non-standard ports, or even the bother of editing it's configuration.

    ;)
     
  6. golfmadnut macrumors newbie

    Joined:
    Mar 29, 2008
    #6
    same problem

    "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"

    This is my exact error except the number in the brackets changes every time


    I have just downloaded Xampp with no other parts installed. ok Apache is there but after installing xampp the localhost works fine php works, its just the same error. After looking through some other sites some are saying its a permissions error? If I try to start mysql via its .exe it has this error "Error 2002 (HY000): Cant connect to local MySQL server through socket '/Applications/xampp/xamppfiles/var/mysql/mysql.sock' (2)"

    I will download the separate parts if I have too but Ive been there before and it seems just as hard to install.

    Any help would be great:)
     
  7. nateritter macrumors newbie

    nateritter

    Joined:
    Apr 29, 2008
    #7
    Line 159 mysql error with xampp

    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. Open up Terminal and type:
    Code:
    sudo killall mysqld
    
    Then try opening up Xampp again.
     
  8. cubico macrumors newbie

    Joined:
    Sep 18, 2008
    #8
    And if the response is "No matching processes were found
    "? aaaarrrggghhhhh!!!!
     
  9. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #9
    Then that would mean MySQL isn't running.
     
  10. cubico macrumors newbie

    Joined:
    Sep 18, 2008
    #11
    Don't worry, be happy... or not?

    After reinitiating the computer I have updated the last version of xampp without results. I have erased xammp and I have returned to install and it does not work either.
    Some configuration file that I have not erased? Which?
    Any Idea?
    aaaarrrgghhhh again :p
     
  11. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #12
    To be honest I've had a lot more luck with MAMP than XAMMP when it comes to MySQL. Not sure why, and more so when I moved to Leopard. Are you using Leopard? I'm not sure about your problem with XAMMP, I don't know what specifically you're trying. Are you using Terminal to start up the servers? And if so, what commands? Just saying it's not working and giving the one error message doesn't help a whole lot since there's a number of possibilities as to what can be causing it.
     
  12. cubico macrumors newbie

    Joined:
    Sep 18, 2008
    #13
    x-file

    Thanks for your interest. Yes, I'm using Leopard 10.5.5 on iMac and I start Mysql with Xampp Control and using terminal with the same result.The "X-file" is that before restart the computer everything it worked well. I'll try to uninstall everything and install again. I'm desperate. :(
     
  13. xavriley macrumors newbie

    Joined:
    Dec 4, 2009
    #14
    a temporary fix...

    in finder, shift+apple+g -> go to /etc

    move my.cnf to the trash or somewhere else, anwhere but /etc

    restart xampp

    - the reason this works is because, if you have two versions of mysql installed (one in xampp, one separate install) they both read the my.cnf in /etc first by default.

    A DISCLAIMER - this may mess up your other mysql install so remember where you put the file if it does, then restore it and turn off xampp to get it back.

    Hope that saves a few headaches...
    read more here
    http://code.openark.org/blog/mysql/manually-installing-multiple-mysql-instances-on-linux-howto
     
  14. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #15
    Been following this, wondering when someone would mention MAMP. I learned a long time ago the best long term solution to turn your Mac into a sandbox is to buy MAMP from the outset. The main reason is the simplicity of it, but also it installs without interfering with the default Mac daemons (Apache, etc) already running. This distinct separation makes updating/tweaking both MAMP and also your Mac devoid of the kind of collisions mentioned in this topic.

    The OP did nothing wrong - to me this is a classic case of book world (O'Reilly) vs. real world - and thanks to the OP for coming here for the advice!

    -jim
     

Share This Page