mySQL on osx server 10.2

cbianchi

Registered
I've installed OSX server on a Mac for web development purposes, but it seems that mySQL refuses to start. I used MySQL Manager, the first time if requested to click a button to install software, which I did, but since the when I press start nothing just happen. The Start button remains clickable. I tried to login, but it would not allow me to...

Can anyone please help?

Thanks!

Cristiano
:confused:
 
Sounds like the good ol' host problem to me.. But it could be a lot of different things.

Have a look in the *.err files in your data director for mySQL (think it is /var/mysql/mysql/data on OS X), they usually do the trick of telling you what is wrong.

If it is the hostname which is the problem, try running "mysql_install_db" in the terminal.. It will then tell you if the hostname cannot be resolved or something like that. Just add the "--force" option and you'll be good to go.

That worked for me..

Good luck.
 
any suggestion on what to do for this error

ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
 
Hi and thanks for your reply.

I looked at the err file as you suggested, and indeed there is a problem with the hostname.
021121 08:58:13 mysqld started
021121 8:58:15 /usr/libexec/mysqld: Table 'mysql.host' doesn't exist
021121 08:58:15 mysqld ended

So I did the mysql_install_db command and got back:
[CristianoMac:/var/mysql] cbianchi# mysql_install_db
Sorry, the host 'CristianoMac' could not be looked up.
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script with
the --force option

Then:

------------------------------
[CristianoMac:/var/mysql] cbianchi# mysql_install_db --force
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
021121 9:09:55 /usr/libexec/mysqld: Shutdown Complete

To start mysqld at boot time you have to copy support-files/mysql.server

cd /usr ; /usr/bin/safe_mysqld &

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

Please report any problems with the /usr/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
--------------------------------------------

If I now try to start it from MySQL Admin I get:

021121 09:10:49 mysqld started
021121 9:10:50 /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errn\
o: 13)
021121 09:10:50 mysqld ended

Any suggestions? What do I bloody do with the hostname? The Server Administration manual is completely useless!

Thanks, Cristiano
 
Ok, at least you're on the right track! :D :D :D

First, try to set the mysql user as the owner of the necessary files in question:

chown -R mysql /var/mysql
.. and all the way down to the host.frm

Let me know how it goes.

//Didde.
 
Back
Top