MySql Server does not start

Hallo zusammen
Ich habe folgendes Problem:
Wenn ich das startup - script des mysql - servers aufrufe, bekomme ich keine Fehlermeldung und dennoch ist dieser schliesslich nicht gestartet. Ich bin ein absoluter FreeBSD Neuling und habe keine Ahnung, wie ich nun vorgehen kann oder muss. Möglicherweise kennt jemand dieses Problem und könnte mir aus der Patsche helfen? ;-)

FreeBSD Server# ./mysql-server start
Starting mysql.
FreeBSD Server# ./mysql-server status
mysql is not running.
FreeBSD Server#
 
@ale
Oh, I'm really sorry for the inconvenience, off course I'll translate my post:

I've the following problem:
When I call the startup script of the mysql server, I don't get any error message but nevertheless it's finally not startet. I'm a completely Newbee of FreeBSD and therefore I've no idea what I may do in order to solve that problem. Maybe one of you guys know that problem and may help me out? ;-)

Thanks a lot
 
You need to add a variable to /etc/rc.conf to allow it to start. Add the following line:

mysql_enable="YES"

Allways check/read the rc script of installed software and it's defined there what is needed and what variables you can set, in this case /usr/local/etc/rc.d/mysql-server
 
@gilinko
First of all, thanks a lot for taking the time! ;-)
Well, the problem is, that I added this line to the /etc/rc.conf file. But the problem seems to be much worse:


This is a snapshot of the console after calling the start script.
FreeBSD Server# ./mysql-server start
Starting mysql.
FreeBSD Server# ./mysql-server status
mysql is not running.
FreeBSD Server#

There is no entry in /var/db/mysql/<myhost>.err :-(
 
gilinko said:
You need to add a variable to /etc/rc.conf to allow it to start. Add the following line:

mysql_enable="YES"
I think he had it, else there should be no output at all.
Am I correct?

gilinko said:
Allways check/read the rc script of installed software and it's defined there what is needed and what variables you can set, in this case /usr/local/etc/rc.d/mysql-server
The easiest way is to start the script with rcvar as argument.
 
would be helpful to check /var/db/mysql/$hostname.err
 
Well I tried mysql_install_db but unfortunately it haven't changed anything. The curious thing is, that it once worked fine. But since yesterday, it's not starting anymore and there is no entry inside the corresponding log-file. Is there another logfile where I could catch a hint?
 
ah, I overlooked that one. Isildur, did you set a custom [font="Courier New"]mysql_dbdir[/font] in /etc/rc.conf?
 
off course:

FreeBSD Server# ls -l /var/db/mysql
total 20542
-rw-rw---- 1 mysql mysql 9264 Feb 14 16:12 FreeBSD Server.err
-rw-rw---- 1 mysql mysql 5242880 Feb 14 16:12 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 Sep 5 2009 ib_logfile1
-rw-rw---- 1 mysql mysql 10485760 Feb 14 16:12 ibdata1
drwx------ 2 mysql mysql 2048 Sep 5 2009 mysql
drwx------ 2 mysql mysql 512 Sep 5 2009 test
FreeBSD Server#
 
well then you have to check the FreeBSD Server.err file.
 
well, now I got something:

090214 16:46:14 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
090214 16:46:14 InnoDB: Started; log sequence number 0 46409
090214 16:46:14 [ERROR] Can't start server : Bind on unix socket: Address already in use
090214 16:46:14 [ERROR] Do you already have another mysqld server running on socket: /tmp/mysql.sock ?
090214 16:46:14 [ERROR] Aborting

090214 16:46:14 InnoDB: Starting shutdown...
090214 16:46:15 InnoDB: Shutdown completed; log sequence number 0 46409
090214 16:46:15 [Note] /usr/local/libexec/mysqld: Shutdown complete

090214 16:46:15 mysqld_safe mysqld from pid file /var/db/mysql/kyrosoft.webhop.net.pid ended
 
I've solved the problem. Don't ask me why, but for some reason the file /var/mysql.sock belonged to root instead of mysql. chown mysql /var/mysql.sock finally solved the problem.
 
I've detected another problem which probably may have been the origin. Whenever I restart my server, the domain name doesn't exist anymore. Each time I have to set it by hostname <hostname>. Is there a way to automatize that procedure?
 
Ok, I solved that problem too by adding the line hostname="<hostname>" into the file /etc/rc.conf

Thanks you a lot for your assistance guys, I really appreciate your help!
 
Back
Top