At 02:03 PM 4/1/99 +0000, Frederik Lindberg wrote:
>On Thu, 1 Apr 1999, David Hanney wrote:
>
>> Mysql works great after installing the freebsd3.1 binary package
>> - if started manually.
>> The problem is that it doesn't auto-start at boot.
>>
>> safe_mysqld seems to run without error.
>> But it quits (without error) about 1 second later:
>> Here is the log output:
>>
>> mysqld started on Thu Apr 1 11:38:05 GMT 1999
>> mysqld ended on Thu Apr 1 11:38:06 GMT 1999
>
>To clarify, if you run safe_mysql manually, it works fine, but if you run
>safe_mysql as part of the bootup process, it fails.
yes
>If you manually start in some way different from the bootup start, e.g. by
>not using safe_mysql, the answer may be in the difference.
its the exact same command being run
e.g. after booting... (#comments added)....
# go to the startup script folder
test: {102} cd /usr/local/etc/rc.d/
# take a look
# and there is the startup script
test: {103} ls -l
total 2
-rwxr-x--x 1 root wheel 111 Feb 13 05:33 apache.sh*
-rwxr-x--- 1 root wheel 160 Feb 13 04:26 mysql.sh*
# is mysql running?
test: {104} mysql
# no
ERROR 2003: Can't connect to MySQL server on localhost (61)
# run the startup script manually
test: {105} ./mysql.sh
# is it running now?
mysqltest: {106} mysql
# yeah
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 3.22.16a-gamma
Type 'help' for help.
mysql>
# wierd huh?
the same startup script does run at boot time
but generates that one-second-of-life log (and no other errors)
>1. Bootup start and manual start are by different users with different
>permissions.
I think local startup is done as root.
I'm root in the above example too.
`
>2. Some facility needed by the program is not yet running. resolver,
>network, file system mount, etc. Try starting mysql last at the particular
>runlevel (3, I assume).
'local package startup' in FreeBSD is practically the last thing that happens
before you get a logon prompt.
hmmmm.......
[)/\\/3