MySQL and SL Server

Discussion in 'Mac OS X Server, Xserve, and Networking' started by VwTdi09, Apr 27, 2010.

  1. VwTdi09, Apr 27, 2010
    Last edited by a moderator: Apr 25, 2011

    macrumors newbie

    Joined:
    May 28, 2009
    #1
    I recently just wiped my Mac Mini SL server and started over, setting up DNS, Web Service and Open Directory. Since this is a sandbox for my own learning, I got through this procedure quite a bit.

    Anyway, since I'm interested in web development, I got DNS running along with the Web service so now I am hosting multiple website on my local network. I wanted to get MySQL going for some projects I want to work on. I went into Server Admin and checked the MySQL service then started it. Now, I get a light-green status indicator next to the MySQL service and it continuously says Starting Up.

    I get these logs:
    Code:
    2010-04-26 19:56:12 America/New_York [I]  Starting MySQL Service
    2010-04-26 19:56:12 America/New_York [I]  Starting MySQL daemon...
    2010-04-26 19:56:12 America/New_York [I]  MySQL: verifying/installing default my.cnf
    2010-04-26 19:56:12 America/New_York [I]  Initializing database directory: /Volumes/Macintosh HD2/ServiceData/MySQL
    2010-04-26 19:56:12 America/New_York [I]  Initialization results:
    Installing MySQL system tables...
    Installation of system tables failed!
    
    Examine the logs in /Volumes/Macintosh HD2/ServiceData/MySQL for more information.
    You can try to start the mysqld daemon with:
    /usr/libexec/mysqld --skip-grant &
    and use the command line tool
    /usr/bin/mysql to connect to the mysql
    database and look at the grant tables:
    
    shell> /usr/bin/mysql -u root mysql
    mysql> show tables
    
    Try 'mysqld --help' if you have problems with paths. Using --log
    gives you a log in /Volumes/Macintosh HD2/ServiceData/MySQL that may be helpful.
    
    The latest information about MySQL is available on the web at
    [url]http://www.mysql.com[/url]
    Please consult the MySQL manual section: 'Problems running mysql_install_db',
    and the manual section that describes problems on your OS.
    Another information source is the MySQL email archive.
    Please check all of the above before mailing us!
    And if you do mail us, you MUST use the /usr/bin/mysqlbug script!
    2010-04-26 19:56:12 America/New_York [I]  Initialization warning/error results:
    /usr/libexec/mysqld: Too many arguments (first extra is 'HD2/ServiceData/MySQL').
    Use --help to get a list of available options
    2010-04-26 19:56:12 America/New_York [W]  Execution of mysql_install_db failed; error = Operation not permitted (1).
    2010-04-26 19:56:12 America/New_York [E]  Database creation failed.
    2010-04-26 19:56:12 America/New_York [I]  MySQL startup options: socket=/var/mysql/mysql.sock; datadir=/Volumes/Macintosh HD2/ServiceData/MySQL; pid-file=/Volumes/Macintosh HD2/ServiceData/MySQL/server.endeavour.com.pid; network=YES
    2010-04-26 19:56:42 America/New_York [E]  {
        NSLocalizedDescription = "MySQL daemon start up timed-out.";
    }
    2010-04-27 12:46:43 America/New_York [I]  Restarting MySQL Service
    2010-04-27 12:46:43 America/New_York [I]  Starting MySQL daemon...
    2010-04-27 12:46:43 America/New_York [I]  MySQL: verifying/installing default my.cnf
    2010-04-27 12:46:43 America/New_York [I]  Initializing database directory: /Volumes/Macintosh HD2/ServiceData/MySQL
    2010-04-27 12:47:43 America/New_York [I]  Initialization results:
    WARNING: The host 'server.endeavour.com' could not be looked up with resolveip.
    This probably means that your libc libraries are not 100 % compatible
    with this binary MySQL version. The MySQL daemon, mysqld, should work
    normally with the exception that host name resolving will not work.
    This means that you should use IP addresses instead of hostnames
    when specifying MySQL privileges !
    Installing MySQL system tables...
    Installation of system tables failed!
    
    Examine the logs in /Volumes/Macintosh HD2/ServiceData/MySQL for more information.
    You can try to start the mysqld daemon with:
    /usr/libexec/mysqld --skip-grant &
    and use the command line tool
    /usr/bin/mysql to connect to the mysql
    database and look at the grant tables:
    
    shell> /usr/bin/mysql -u root mysql
    mysql> show tables
    
    Try 'mysqld --help' if you have problems with paths. Using --log
    gives you a log in /Volumes/Macintosh HD2/ServiceData/MySQL that may be helpful.
    
    The latest information about MySQL is available on the web at
    [url]http://www.mysql.com[/url]
    Please consult the MySQL manual section: 'Problems running mysql_install_db',
    and the manual section that describes problems on your OS.
    Another information source is the MySQL email archive.
    Please check all of the above before mailing us!
    And if you do mail us, you MUST use the /usr/bin/mysqlbug script!
    2010-04-27 12:47:43 America/New_York [I]  Initialization warning/error results:
    /usr/libexec/mysqld: Too many arguments (first extra is 'HD2/ServiceData/MySQL').
    Use --help to get a list of available options
    2010-04-27 12:47:43 America/New_York [W]  Execution of mysql_install_db failed; error = Operation not permitted (1).
    2010-04-27 12:47:43 America/New_York [E]  Database creation failed.
    2010-04-27 12:47:43 America/New_York [I]  MySQL startup options: socket=/var/mysql/mysql.sock; datadir=/Volumes/Macintosh HD2/ServiceData/MySQL; pid-file=/Volumes/Macintosh HD2/ServiceData/MySQL/server.endeavour.com.pid; network=YES
    2010-04-27 12:48:13 America/New_York [E]  {
        NSLocalizedDescription = "MySQL daemon start up timed-out.";
    }
    Any help would be greatly appreciated.
     

    Attached Files:

  2. macrumors regular

    Joined:
    Jan 6, 2008
    #2
    Try using MAMP...MySQL on SLS sucks, it just invokes the service, doesn't give you any control over databases, tables, etc. MAMP is super easy and comes ready to control...

    $500 for open source software...yay!
     
  3. macrumors regular

    Joined:
    Jan 6, 2008
  4. macrumors newbie

    Joined:
    May 28, 2010
    #4
    Just wanted to mention that I spent the last two days on this exact problem.

    Finally, ended up stopping the service from terminal using "sudo serveradmin stop mysql"

    Then normally at this point I'd start try starting it from the GUI and it'd always fail; however, my last attempt was to start it from terminal.

    I ran a "sudo serveradmin start mysql" and it started up perfectly.

    Looked in the Serveradmin GUI and all was fine. Stopped and started the service from the GUI and all worked as expected. No idea why it would matter how the service was started through Serveradmin ... but I guess it does (at least for me).

    Just posting this reply in hopes that it helps you.
     
  5. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #5
    Of course it does. It just assumes you actually know how to use MySQL.
     
  6. macrumors 68040

    calderone

    Joined:
    Aug 28, 2009
    Location:
    Seattle
    #6
    Exactly. I have had no issue running MySQL on SL Server, you simply have to know what you are doing.
     
  7. macrumors 68030

    Winni

    Joined:
    Oct 15, 2008
    Location:
    Germany.
    #7
    I'm pretty sure you get the commercial license of MySQL in SL server.
     
  8. kainjow, Apr 25, 2011
    Last edited: Apr 25, 2011

    Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #8
    The problem (for us at least) is when you install using MySQL's installer, it defaults to installing into /usr/local/mysql - however the MySQL service starts and stops the process by using the org.mysql.mysqld launchd plist, which is located at /System/Library/LaunchDaemons/org.mysql.mysqld.plist. This file tries to start MySQL using /usr/libexec/mysqld which might not exist. So to fix I created a symlink at that location:

    Code:
    cd /usr/libexec
    sudo ln -s /usr/local/mysql/bin/mysqld
    After this, and making sure Server Admin > MySQL > Settings > Database location was set to /usr/local/mysql/data, it worked.
     

Share This Page