Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Sep 2005 15:04:23 -0500
From:      Kevin Kinsey <kdk@daleco.biz>
To:        eoghan <freebsd@redry.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: mysql port install
Message-ID:  <43385447.2000708@daleco.biz>
In-Reply-To: <A9542760-015D-431A-9CD5-315BA5D60B7C@redry.net>
References:  <A9542760-015D-431A-9CD5-315BA5D60B7C@redry.net>

next in thread | previous in thread | raw e-mail | index | archive | help
eoghan wrote:

> Hello
> Im having a problem getting mysql (version 4.1.14) to work. Im  
> installing
> from ports, which was updated today. Each time i try #>mysql
> is get: ERROR 2002 (HY000): Can't connect to local MySQL server 
> through socket '/tmp/mysql.sock' (2)
> mysql.sock isnt in /tmp/ which is a problem. The manual and
> searches  say that this means the server usually isnt running,
> so type mysqld  to start it. But i just get command not found.
> The only reference to  mysqld is in /usr/local/man/man1/mysql.1.gz
> I was wondering if someone had any luck getting this port
> installed?  Im using freeBSD 5.3 by the way.
> Thanks
> Eoghan



<<Surely this is a FAQ by now, and a search of the
list archives would provide the answer.  In particular,
this is _not_ hackers@ material, which might account for
the fact that I'm sounding a little terse here.  It's nothing
personal, I assure you.  I'm redirecting the cc to the appropriate
list.>>

Look for a "mysql-server.sh" script under /usr/local/etc/rc.d.  As root,
type "/usr/local/etc/rc.d/mysql-server.sh start".  The server *should* 
start.

To make sure it does, add "mysql_enable=YES" to /etc/rc.conf.
This is part of the "RCng" system, and it's mentioned about
a hundred-eleventy times in ***/usr/ports/UPDATING***.  (Didja
read that one? ;-)

mysqld doesn't live in your $PATH on a FreeBSD system, so
you can't expect to call it with simply "mysqld".  For its own
reasons, AFAIK, it's at /usr/local/libexec/mysqld....

I have one server from a long time ago where I simply started
MySQL from cron(8) thus (which goes to show that I had similar
issues once upon a time and shouldn't be too hard on a newb, eh?):

@reboot   /usr/local/libexec/mysqld -u mysql 
--pid-file=/usr/local/var/secure.pid -h /var/db/mysql/ &

So, whatever boils your fish is fine.  But *lots* of us have MySQL
working.  ;-)

HTH,

Kevin Kinsey



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43385447.2000708>