Am Mittwoch, 22. Januar 2003 15:39 schrieb Buchan Milne: > On current cooker and 9.0 (at least, don't have 8.2 or 8.1 boxes around > any more, but 8.0 is not affected), mysql won't start up when > /etc/nsswitch.conf has 'ldap' in the group line: > > [bgmilne:~]# grep ^group /etc/nsswitch.conf > group: files ldap nisplus nis winbind3 > [bgmilne:~]# service mysql start > Starting MySQL Server [ OK ] > [bgmilne:~]# service mysql status > mysqld is stopped > [bgmilne:~]# mysql > ERROR 2002: Can't connect to local MySQL server through socket > '/var/lib/mysql/mysql.sock' (2) > > > > After removing the ldap entry from the group line in nsswitch.conf: > > [bgmilne:~]# grep ^group /etc/nsswitch.conf > group: files nisplus nis winbind3 > [bgmilne:~]# service mysql start > Starting MySQL Server [ OK ] > [bgmilne:~]# service mysql status > mysqld (pid 10153) is running... > 10152 (pid 10151) is running... > [bgmilne:~]# mysql > Welcome to the MySQL monitor. Commands end with ; or \g. > Your MySQL connection id is 1 to server version: 3.23.54 > > Type 'help;' or '\h' for help. Type '\c' to clear the buffer. > > mysql> Bye > > > > > If you su to mysql , you can manually start safe_mysqld even if you use > nss_ldap for groups: > > [bgmilne:~]# service mysql status > mysqld is stopped > [bgmilne:~]# su - mysql > -bash-2.05b$ grep ^group /etc/nsswitch.conf > group: files ldap nisplus nis winbind3 > -bash-2.05b$ safe_mysqld & > [1] 9773 > -bash-2.05b$ Starting mysqld daemon with databases from /var/lib/mysql > > -bash-2.05b$ mysql > Welcome to the MySQL monitor. Commands end with ; or \g. > Your MySQL connection id is 1 to server version: 3.23.54 > > Type 'help;' or '\h' for help. Type '\c' to clear the buffer. > > mysql> Bye > -bash-2.05b$ logout > [bgmilne:~]# service mysql status > mysqld (pid 9782) is running... > 9781 (pid 9780) is running... > [bgmilne:~]# > [bgmilne@bgmilne bgmilne]$ mysql > Welcome to the MySQL monitor. Commands end with ; or \g. > Your MySQL connection id is 2 to server version: 3.23.54 > > Type 'help;' or '\h' for help. Type '\c' to clear the buffer. > > mysql> Bye > [bgmilne@bgmilne bgmilne]$ > > I tried to use "su - mysql -c '(existing safe_mysqld command)'" in the > init script, but that didn't work. > > Any ideas?
Hm, I use cmd="$bindir/safe_mysqld --datadir=$datadir --pid-file=$pid_file 2>&1 | logger -t safe_mysqld &" su - mysql -c "$cmd" in my mysql script in /etc/init.d and it works fine here. But if i recal fine, the way su - mysql -c "$bindir/safe_mysqld --datadir=$datadir --pid-file=$pid_file 2>&1 | logger -t safe_mysqld &" does not work. Martin -- ------------------------------------------------------------ H E L I X Gesellschaft f�r Software & Engineering mbH ------------------------------------------------------------ Hanauer Landstrasse 52 Telefon (069) 4789 35-30 60314 Frankfurt am Main Telefax (069) 4789 35-44 ------------------------------------------------------------ http://www.helix-gmbh.net [EMAIL PROTECTED] ------------------------------------------------------------
msg88176/pgp00000.pgp
Description: signature
