![]() |
|
|||||||
| OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
![]() |
|
|
Thread Tools | Display Modes |
|
|||
|
When i run "#/usr/local/bin/mysqld_safe &" i got these error message.
Code:
# /usr/local/bin/mysqld_safe & [1] 8190 # touch: /var/mysql/fiddler.fiddler.com.err: No such file or directory chown: /var/mysql/fiddler.fiddler.com.err: No such file or directory Starting mysqld daemon with databases from /var/mysql /usr/local/bin/mysqld_safe[314]: cannot create /var/mysql/fiddler.fiddler.com.err: No such file or directory /usr/local/bin/mysqld_safe: cannot create /var/mysql/fiddler.fiddler.com.err: No such file or directory STOPPING server from pid file /var/mysql/fiddler.fiddler.com.pid tee: /var/mysql/fiddler.fiddler.com.err: No such file or directory 090403 15:43:31 mysqld ended tee: /var/mysql/fiddler.fiddler.com.err: No such file or directory |
|
||||
|
You should run MySQL as the mysql user, not as the super user, i.e.:
# mysqld_safe --user=mysqlThe FreeBSD port adds the mysql user&group when the package is installed for you, I don't know if OpenBSD also does this; Create the user&group if they don't exist yet. Does the /var/mysql directory exist? Also make sure it is chown(8)-ed to mysql:mysql Additionally, you must run mysql_install_db to create the default MySQL administration database after you have first installed MySQL, remember to run it with the --user=mysql argument. Please do read the mysql_install_db manual linked above, there are additional arguments that may be needed (i.e. --basedir).
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. |
|
||||
|
When you did your pgk_add, bsdnewbie, you got a message that said:
Quote:
__________________
OpenBSD LiveCDs/LiveDVDs Last edited by jggimi; 3rd April 2009 at 01:45 PM. |
|
|||
|
Where i add this lines to?
Code:
And start the server like this: if [ -x /usr/local/bin/mysqld_safe ] ; then su -c mysql root -c '/usr/local/bin/mysqld_safe >/dev/null 2>&1 &' echo -n ' mysql' fi |
|
||||
|
Quoting rc.local(5):
Quote:
__________________
OpenBSD LiveCDs/LiveDVDs |
|
|||
|
Once again, you are showing that you have no familarity with information found in the FAQ. This subject is covered in Section 10.3:
http://openbsd.org/faq/faq10.html#rc |
|
||||
|
How I start MySQL, in 3 easy listings. (note the user/group used is named _mysql)
in /etc/rc.local: Code:
# launch the MySQL database server
if [ -x /usr/local/bin/mysqld_safe -a -x /etc/rc.mysql ]; then
/etc/rc.mysql
fi
echo '.'
Code:
#!/bin/sh # # A simple script to launch mysqld with the proper login privileges # su -c _mysql root -c '/usr/local/bin/mysqld_safe >/dev/null 2>&1 &' echo -n ' mysql' Code:
#
# This class is used when running MySQL from /etc/rc.local
# XXX: It will *N_O_T* be used when starting/stopping mysqld manually!!
#
_mysql:\
:ignorenologin:\
:datasize=infinity:\
:maxproc=infinity:\
:openfiles=3580:\ # I've set this to sysctl::kern.maxfiles
:stacksize-cur=8M:\
:localcipher=blowfish,8:\
:tc=daemon:
The rc.mysql script is used so that if I have to stop my database for some reason, I can restart it with the correct credentials without having to check rc.local for the commands. As Carpetsmoker, jggimi, and ocicat have pointed out - do be sure to read the documentation while you're at it, it helps.
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. Last edited by TerryP; 3rd April 2009 at 04:18 PM. |
|
|||
|
It works now.
|
![]() |
| Tags |
| mysqld_safe |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to start X11 on login? | Mantazz | FreeBSD Ports and Packages | 2 | 10th July 2009 07:27 PM |
| Which is the best solution from start bsd.mp? | aleunix | OpenBSD General | 18 | 4th May 2009 06:33 PM |
| How do I start kde4? | PatrickBaer | FreeBSD General | 5 | 26th September 2008 08:18 PM |
| MYSQL HOW TO START | disappearedng | FreeBSD General | 7 | 18th September 2008 09:48 AM |
| KDE wont start up | dctr | FreeBSD General | 9 | 11th June 2008 05:59 AM |