PDA

View Full Version : MySQL and SL Server




VwTdi09
Apr 27, 2010, 04:38 PM
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:
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
http://www.mysql.com
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
http://www.mysql.com
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.



myjay610
May 13, 2010, 07:45 PM
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!

myjay610
May 13, 2010, 07:46 PM
http://www.mamp.info/en/index.html

oranges2apples
May 28, 2010, 11:19 AM
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.

Cromulent
May 29, 2010, 04:10 AM
MySQL on SLS sucks, it just invokes the service, doesn't give you any control over databases, tables, etc.

Of course it does. It just assumes you actually know how to use MySQL.

calderone
May 29, 2010, 12:06 PM
Of course it does. It just assumes you actually know how to use MySQL.

Exactly. I have had no issue running MySQL on SL Server, you simply have to know what you are doing.

Winni
May 31, 2010, 02:59 AM
$500 for open source software...yay!

I'm pretty sure you get the commercial license of MySQL in SL server.

kainjow
Apr 25, 2011, 12:03 PM
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:

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.