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?
--
John Lind
jo...@starfire.MN.ORG
_______________________________________________
freebsd-...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questi...@freebsd.org"
> 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?
> --
>
> John Lind
> jo...@starfire.MN.ORG<http://lists.freebsd.org/mailman/listinfo/freebsd-questions>
>
I completely switched to postgresql long ago, but maybe I remember enough to
provide a clue, actually this a really application agnostic.
1. edit the config file to increase verbosity.
2. start the binary from the commandline, don't run the start-up scripts as
they sometimes mask errors.
--
Adam Vande More
/var/db/mysql/<hostname>.err should contain more information. The
rc.d/mysql-server script was recently changed to wait up to 15 seconds for
the server to become ready, which is the cause of the long delay. It
doesn't check to see if the pid file has disappeared (which indicates the
server has exited).
--
Dan Nelson
dne...@allantgroup.com
> 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.
-Mike
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?
Hi John,
If I'm having problems with an rc.d script, I'll invoke it with shell
verbosity turned on so I can see exactly what commands are executing.
You might try that if the other posted suggestions don't fix the problem.
Invoke the script like this:
sh -x /usr/local/etc/rc.d/mysqlserver start
Hope that helps,
Greg
- --
Greg Larkin
http://www.FreeBSD.org/ - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
http://twitter.com/sourcehosting/ - Follow me, follow you
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iD8DBQFLZuh80sRouByUApARAvx3AKDBf2N7AL6bdGwB7xstpcLmrAE2dwCgmWkD
o2I1yIPXWEaOx4zFl5sl3bM=
=P/dg
-----END PGP SIGNATURE-----
Maybe a long shot, but I once had a problem starting mysql because the
sticky bit was not set on /tmp.
I had previously dump/restored the system and forgot to chmod -R 1777 /tmp
Don't remember the exact error message - if there was any - but it took
me quite some time to figure out.
Have a quick look at this.
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
jo...@starfire.MN.ORG
That's because mysql_install_db which gets called by binary-configure has
/var/db/mysql hardcoded and doesn't read rc.conf.
Ruben