Re: mysql silently failing to start - suggestions? (FIXED!)

2010-02-04 Thread Ruben de Groot
On Mon, Feb 01, 2010 at 09:13:40PM -0600, John typed:
 
 Good job, Mike!  You nailed it, though what some of the other helpful
 folks wrote had me on the right path, too.  For some reason, the
 binary-configure after the pkg_add left everything owned by 
 root:wheel.  cd /mysql ; chown -R mysql:mysql . was the solution.

That's because mysql_install_db which gets called by binary-configure has
/var/db/mysql hardcoded and doesn't read rc.conf.

Ruben
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mysql silently failing to start - suggestions? (FIXED!)

2010-02-01 Thread John
On Sun, Jan 31, 2010 at 11:35:22PM -0500, Michael Powell wrote:
 John wrote:
 
  If this isn't the right list - if I should try another let me know -
  but since this is the mysql-server-5.4.2 package, and since you
  folks have been so helpful, I thought I'd give it a go.
  
  Anyway, the system is 8.0-RELEASE and that package is installed,
  and I can't start the server.  Not only can I not start the server,
  but it's not giving me a clue.  I can't find anything anywhere.
  Not in /var/log/messages, not anywhere.  When I run
  /usr/local/etc/rc.d/mysqlserver start
  it says Starting mysql., pauses for several seconds (I don't see
  anything go by in top) and then the script exits.  At that point,
  one would expect, there's no /tmp/mysql.sock, there's nothing
  in messages or anywhere else.  With nothing to go on, well, I don't
  know where to start.  Any suggestions?
 
 First is there a mysql_enable=YES line in /etc/rc.conf? The rc subr 
 startup system requires it and also the complete path as you did type above. 
 Although since it is mysql-server and you got a response I'll assume the 
 above is just a typo here in this mail.
 
 If you have changed the location of the database files this variable will 
 need setting in /etc/rc.conf as well. The default is /var/db/mysql. Notice 
 this directory should be owned by the mysql:mysql user/group combo. This 
 will allow for the writing of the machine-hostname.pid file. There will 
 also be a machine-hostname.err file which is the log you need to look at. 
 If these files are not present it is either not getting that far in the 
 startup, or there is a permissions problem. The normal location of the 
 socket is /tmp, which should be permissions 1777 (sticky bit set).
 
 You do have a line setting the hostname of the machine in /etc/rc.conf too, 
 right? Such as hostname=testbed.test.zip for my local dev server at home. 
 This should be resolvable either by DNS or a hosts file. Also, be aware that 
 the location of the my.cnf file is now /usr/local/etc, although should this 
 be missing it should still look for it in /var/db/mysql as a fallback. If 
 this file is world writable MySQL will ignore it.
 
 The establishment of the mysql user and group should have occurred as part 
 of the port installation. I use ports and not packages, as well as the older 
 version of 5.1.42 so I cannot speak to the efficacy of installing a package 
 of 5.4.x. Perhaps a package problem? Try installing the 5.1.42 port using 
 the ports system instead is one possibility if such may be the case.

Good job, Mike!  You nailed it, though what some of the other helpful
folks wrote had me on the right path, too.  For some reason, the
binary-configure after the pkg_add left everything owned by 
root:wheel.  cd /mysql ; chown -R mysql:mysql . was the solution.
After that, everything came out and flew straight!  Somehow, the mysql
user and group got created, but everything was still owned by root:wheel.
Go figure.

Just for the record, my rc.conf had already contained:
mysql_dbdir=/mysql
mysql_enable=YES
mysql_pidfile=/var/run/mysqld.pid

Also for the record, the last one is ignored.  The pid file
is still in /mysql/`hostname`.pid

So - for those of you who said don't try to run it anywhere but
/var/db/mysql - maybe you're right.  Maybe that's what led,
indirectly, to the ownership not getting set correctly.  But, once
you know the problem, the solution is simple, and it's now doing a
great job of running where I want it to run.
-- 

John Lind
j...@starfire.mn.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org