Women in Technology

Hear us Roar



Article:
  Apache Web-Serving With Mac OS X, Part 5
Subject:   mysqld ended...waaahhh
Date:   2002-08-30 18:45:33
From:   elroysf
OK, here's the deal:


sudo ./bin/safe_mysqld --user=mysql &


"Starting mysqld daemon with databases from /usr/local/mysql/data"


"mysqld ended"


bummer.


any ideas?

Full Threads Oldest First

Showing messages 1 through 6 of 6.

  • mysqld ended...waaahhh
    2003-12-15 06:01:03  anonymous2 [View]

    To me it was enough the chown command..
    anyway thanx a lot i was getting crazy with it!!!
    Bye Massimo
    • mysqld ended...waaahhh
      2005-06-18 00:46:07  trial_and_error [View]

      Hiya

      I wrestled with this same problem for hours (Mac Powerbook/Unix).

      When I eventually did get it working, after following dozens of threads, I'm not even sure how I did it. For a start, downgrading to PHP 4.0.24 might have helped (restarting after wiping the old version, then again after new install).

      I thought I'd paste my last few steps below in the hope you'll be able to decipher it:


      lepadouen:/usr/local/mysql root# ./bin/mysqld_safe
      Starting mysqld daemon with databases from /Library/MySQL/var
      STOPPING server from pid file /Library/MySQL/var/lepadouen.plus.com.pid
      050523 22:31:49 mysqld ended

      lepadouen:/usr/local/mysql root# sudo chown -R mysql data/
      lepadouen:/usr/local/mysql root# sudo echo

      lepadouen:/usr/local/mysql root# ./bin/mysqld_safe &
      [1] 573
      lepadouen:/usr/local/mysql root# Starting mysqld daemon with databases from /Library/MySQL/var
      STOPPING server from pid file /Library/MySQL/var/lepadouen.plus.com.pid
      050523 22:32:59 mysqld ended

      <root# sudo find /usr/local/mysql/data -type f -exec rm {} ';'
      [1]+ Done ./bin/mysqld_safe
      <root# sudo find /usr/local/mysql/data -type f -exec rm {} ';'
      lepadouen:/usr/local/mysql root# sudo hostname 127.0.0.1
      lepadouen:/usr/local/mysql root# cd /usr/local/mysql
      lepadouen:/usr/local/mysql root# sudo ./scripts/mysql_install_db
      sudo: ./scripts/mysql_install_db: command not found
      lepadouen:/usr/local/mysql root# ./bin/mysql_install_db
      Preparing db table
      Preparing host table
      Preparing user table
      Preparing func table
      Preparing tables_priv table
      Preparing columns_priv table
      Installing all prepared tables
      050523 22:34:55 Warning: Setting lower_case_table_names=2 because file system for /Library/MySQL/var/ is case insensitive
      050523 22:34:55 /Library/MySQL/libexec/mysqld: Shutdown Complete


      To start mysqld at boot time you have to copy support-files/mysql.server
      to the right place for your system

      PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
      To do so, start the server, then issue the following commands:
      /Library/MySQL/bin/mysqladmin -u root password 'new-password'
      /Library/MySQL/bin/mysqladmin -u root -h 127.0.0.1 password 'new-password'
      See the manual for more instructions.

      You can start the MySQL daemon with:
      cd /Library/MySQL ; /Library/MySQL/bin/mysqld_safe &

      You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
      cd sql-bench ; perl run-all-tests

      Please report any problems with the /Library/MySQL/bin/mysqlbug script!

      The latest information about MySQL is available on the web at
      http://www.mysql.com
      Support MySQL by buying support/licenses at https://order.mysql.com

      lepadouen:/usr/local/mysql root# sudo echo

      lepadouen:/usr/local/mysql root# /Library/MySQL/bin/mysqld_safe &
      [1] 608
      lepadouen:/usr/local/mysql root# Starting mysqld daemon with databases from /usr/local/mysql/var
      STOPPING server from pid file /usr/local/mysql/var/127.0.0.1.pid
      050523 22:35:21 mysqld ended

      sudo chown -R mysql data/
      [1]+ Done /Library/MySQL/bin/mysqld_safe
      lepadouen:/usr/local/mysql root#
      lepadouen:/usr/local/mysql root# /Library/MySQL/bin/mysqld_safe &
      [1] 627
      lepadouen:/usr/local/mysql root# Starting mysqld daemon with databases from /usr/local/mysql/var
      </code>


      Hope that helps?




  • mysqld ended...waaahhh
    2003-06-13 12:57:35  anonymous2 [View]

    This is probably it:

    The databases installed in the mysql data directory, /var/lib/mysql are not owned by the
    mysql user, but by the user who ran
    mysql_install_db. chown them to mysql and chgrp
    them to the appropriate group e.g.

    chown -R mysql /var/lib/mysql/mysql
    chgrp -R daemons /var/lib/mysql/mysql
    • mysqld ended...waaahhh
      2008-02-09 14:56:25  sriv1211 [View]

      to that anonymous2 guy:
      thanks so much for that comment - i've been trying for days literally to find out the reason. i know that u posted the comment in 2003, and its now 2008, u may never read this post again, but thanks so much for that simple sollution!!!!!
    • mysqld ended...waaahhh
      2004-02-05 14:21:10  manshreck [View]

      By the way, this worked, but in Mac OS X 10.2 you need to set permissions on the "data" and "bin" directories within the MySQL installation (assuming you have MySQL startup automatically as the mysql user). That is:

      user% sudo chown -R mysql /usr/local/mysql/data
      user% sudo chown -R mysql /usr/local/mysql/bin
      user% sudo chgrp -R mysql /usr/local/mysql/data
      user% sudo chgrp -R mysql /usr/local/mysql/bin

      Note: I keep both user and group as mysql
      • mysqld ended...waaahhh
        2009-09-19 21:27:15  atrerus [View]

        I had the same issue on OSX 10.5. The problem seems to be that OSX puts underscores before all non "User" accounts, so the MySQL user is '_mysql'. When you attempt to start the service it blows up because it's expecting the directories to be owned by the user 'mysql' but they are actually owned by '_mysql'.

        That's speculation on my part, but I do know that by chowning the database directory to 'mysql' I was able to get things to work. Thanks for the tip!