Summary: | starting mysql fails in checkconfig() / version 3.23.56 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Russ Tennant <russ> |
Component: | [OLD] Server | Assignee: | Gentoo Linux MySQL bugs team <mysql-bugs> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | rac, robbat2, woodchip |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Russ Tennant
2003-04-05 21:06:43 UTC
Method and I talked about this on IRC, and he came up with the following: awk -F = '{ if ( $0 ~ /^datadir/ ) { sub(/[ \t]/,"",$2); print $2 } }' < /etc/mysql/my.cnf fine. either that or this will do: my_print_defaults mysqld | grep -- --datadir | sed -e "s|^.*=\(.*\)|\1|" i like the way this mysql-bugs thing is working out. more eyes on these little bugs means they'll get atention quicker. but go for it, you found the fix first ;-) which of the two solutions would be better? I think the method with piping in the conf file would be better, as under some cases if your conf file contains errors, my_print_defaults won't work. yup, this mysql-bugs works out well. as does php-bugs. The sed script (#2) looks like it works. I don't think other awk script (#1) takes into consideration the case where there is whitespace before the variable name: [\s]+datadir=/var/lib/mysql fixed in CVS. Change applied to both mysql4 and mysql3 init scripts. I've put it in as a bugfix, as that is what it really is, so no version bump. Closing old bugs. |