1 |
THIS POST IS MORE LEGIBLE ON THE FORUMS: |
2 |
http://forums.gentoo.org/viewtopic-p-2594528.html#2594528 |
3 |
|
4 |
/etc/init.d/mysql is acting very strangely on a fresh mysql (4.0.25-r2). I've |
5 |
tried to install the stable version as well, but I get the same nonsense. |
6 |
|
7 |
Floow along and you'll see what I mean. |
8 |
|
9 |
No previous instances of mysql are running: |
10 |
[code] |
11 |
localhost mysql # ps -A | grep sql |
12 |
localhost mysql # |
13 |
[/code] |
14 |
|
15 |
When I run the mysql init script I get a failed symbol, with only a reference |
16 |
to /etc/mysql/my.cnf; this isn't very useful debugging info... |
17 |
[code] |
18 |
localhost mysql # /etc/init.d/mysql start |
19 |
* Caching service dependencies ... |
20 |
[ ok ] |
21 |
* Starting mysqld (/etc/mysql/my.cnf) ... |
22 |
[ !! ] |
23 |
localhost mysql # |
24 |
[/code] |
25 |
|
26 |
So, I go check out the logs; again, not very much useful debugging info. |
27 |
[code] |
28 |
localhost mysql # pwd |
29 |
/var/log/mysql |
30 |
localhost mysql # ls |
31 |
mysql.err mysqld.err |
32 |
localhost mysql # cat mysql.err |
33 |
050722 19:41:24 mysqld started |
34 |
localhost mysql # cat mysqld.err |
35 |
050722 19:41:24 InnoDB: Database was not shut down normally. |
36 |
InnoDB: Starting recovery from log files... |
37 |
InnoDB: Starting log scan based on checkpoint at |
38 |
InnoDB: log sequence number 0 43892 |
39 |
InnoDB: Doing recovery: scanned up to log sequence number 0 43892 |
40 |
050722 19:41:24 InnoDB: Flushing modified pages from the buffer pool... |
41 |
050722 19:41:24 InnoDB: Started |
42 |
/usr/sbin/mysqld: ready for connections. |
43 |
Version: '4.0.25' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Gentoo |
44 |
Linux mysql-4.0.25-r2 |
45 |
localhost mysql # |
46 |
[/code] |
47 |
|
48 |
There's probably no debugging useful debugging info because mysql started just |
49 |
fine :roll: |
50 |
|
51 |
[code] |
52 |
localhost mysql # ps -A | grep mysql |
53 |
909 ? 00:00:00 mysqld_safe |
54 |
948 ? 00:00:00 mysqld |
55 |
localhost mysql # |
56 |
[/code] |
57 |
|
58 |
I can connect to mysql without issue as well: |
59 |
[code] |
60 |
localhost mysql # mysql -u root -p |
61 |
Enter password: |
62 |
Welcome to the MySQL monitor. Commands end with ; or \g. |
63 |
Your MySQL connection id is 3 to server version: 4.0.25 |
64 |
|
65 |
Type 'help;' or '\h' for help. Type '\c' to clear the buffer. |
66 |
|
67 |
mysql> quit |
68 |
Bye |
69 |
localhost mysql # |
70 |
[/code] |
71 |
|
72 |
I might be inclined to not care and just continue development; but.... |
73 |
|
74 |
[code] |
75 |
localhost mysql # /etc/init.d/mysql stop |
76 |
* ERROR: "mysql" has not yet been started. |
77 |
localhost mysql # |
78 |
[/code] |
79 |
|
80 |
The fact that I can't use the runscript to stop the proess gets to me... I'm |
81 |
itching to fix this. |
82 |
|
83 |
Here is the /etc/mysql/my.cnf file with comments grep'd out: |
84 |
|
85 |
[code] |
86 |
localhost mysql # grep -v '^#' /etc/mysql/my.cnf |
87 |
|
88 |
[client] |
89 |
port = 3306 |
90 |
socket = /var/run/mysqld/mysqld.sock |
91 |
|
92 |
[safe_mysqld] |
93 |
err-log = /var/log/mysql/mysql.err |
94 |
|
95 |
[mysqld] |
96 |
user = mysql |
97 |
pid-file = /var/run/mysqld/mysqld.pid |
98 |
socket = /var/run/mysqld/mysqld.sock |
99 |
log-error = /var/log/mysql/mysqld.err |
100 |
basedir = /usr |
101 |
datadir = /var/lib/mysql |
102 |
tmpdir = /tmp |
103 |
language = /usr/share/mysql/english |
104 |
skip-locking |
105 |
set-variable = key_buffer=16M |
106 |
set-variable = max_allowed_packet=1M |
107 |
set-variable = thread_stack=128K |
108 |
bind-address = 127.0.0.1 |
109 |
port = 3306 |
110 |
set-variable = innodb_buffer_pool_size=32M |
111 |
set-variable = innodb_additional_mem_pool_size=1M |
112 |
innodb_data_home_dir = /var/lib/mysql/ |
113 |
innodb_log_arch_dir = /var/lib/mysql/ |
114 |
innodb_log_group_home_dir = /var/lib/mysql/ |
115 |
innodb_data_file_path = ibdata1:10M:autoextend:max:128M |
116 |
set-variable = innodb_log_file_size=8M |
117 |
set-variable = innodb_log_buffer_size=1M |
118 |
set-variable = innodb_log_files_in_group=2 |
119 |
innodb_flush_log_at_trx_commit=1 |
120 |
|
121 |
|
122 |
[mysqldump] |
123 |
quick |
124 |
set-variable = max_allowed_packet=1M |
125 |
|
126 |
[mysql] |
127 |
|
128 |
[isamchk] |
129 |
set-variable = key_buffer=16M |
130 |
localhost mysql # |
131 |
[/code] |
132 |
|
133 |
Here is the run script in question. Also, before installing mysql, I made sure |
134 |
that there was no previous /etc/init.d/mysql file; so, this is surly the |
135 |
runscript created by the fresh mysql-4.0.25-r2 emerge. |
136 |
|
137 |
[code]localhost mysql # cat /etc/init.d/mysql |
138 |
#!/sbin/runscript |
139 |
# Copyright 1999-2004 Gentoo Foundation |
140 |
# Distributed under the terms of the GNU General Public License v2 |
141 |
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/mysql-4.0.24-r2.rc6,v |
142 |
1.1 2005/05/17 09:08:46 robbat2 Exp $ |
143 |
|
144 |
depend() { |
145 |
use dns net |
146 |
} |
147 |
|
148 |
getconfig() { |
149 |
MY_CNF=${MY_CNF=/etc/mysql/my.cnf} |
150 |
if [ ! -f ${MY_CNF} ]; then |
151 |
eerror "No ${MY_CNF} file exists! Using automatic defaults!" |
152 |
fi |
153 |
|
154 |
#dir=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed |
155 |
-e 's|^--datadir=||'` |
156 |
#dir=`my_print_defaults mysqld | sed -ne '/datadir/s|^--datadir=||p' | |
157 |
tail -n1` |
158 |
local mysqld_cnf="`my_print_defaults --config-file=${MY_CNF} mysqld`" |
159 |
datadir=`echo "${mysqld_cnf}" | sed -ne '/datadir/s|^--datadir=||p' | |
160 |
tail -n1` |
161 |
pidfile=`echo "${mysqld_cnf}" | sed -ne '/pid-file/s|^--pid-file=||p' |
162 |
| tail -n1` |
163 |
basedir=`echo "${mysqld_cnf}" | sed -ne '/basedir/s|^--basedir=||p' | |
164 |
tail -n1` |
165 |
socket=`echo "${mysqld_cnf}" | sed -ne '/socket/s|^--socket=||p' | |
166 |
tail -n1` |
167 |
|
168 |
# push these out to the script |
169 |
export MY_CNF |
170 |
export pidfile |
171 |
export datadir |
172 |
export basedir |
173 |
export socket |
174 |
} |
175 |
|
176 |
checkconfig() { |
177 |
getconfig |
178 |
if [ -z "${datadir}" ]; then |
179 |
eerror "Your mysql doesn't have any datadir setting, default |
180 |
or specific" |
181 |
eerror "Please check your my.cnf : ${MY_CNF}" |
182 |
return 1 |
183 |
fi |
184 |
|
185 |
if [ ! -d "$datadir/mysql" ]; then |
186 |
eerror "You don't appear to have the mysql database installed |
187 |
yet." |
188 |
eerror "Please run /usr/bin/mysql_install_db to have this |
189 |
done..." |
190 |
return 1 |
191 |
fi |
192 |
} |
193 |
|
194 |
start() { |
195 |
local retstatus=1 |
196 |
local maxtry=5 |
197 |
getconfig |
198 |
checkconfig || return 1 |
199 |
ebegin "Starting mysqld (${MY_CNF})" |
200 |
start-stop-daemon --start --quiet --background \ |
201 |
--exec "${basedir}/bin/mysqld_safe" \ |
202 |
-- --defaults-file=${MY_CNF} >/dev/null 2>&1 |
203 |
retstatus=$? |
204 |
while ! [[ -S "${socket}" || "${maxtry}" -lt "1" || "${retstatus}" -gt |
205 |
"0" ]] ; do |
206 |
maxtry=$(($maxtry-1)) |
207 |
echo -n "." |
208 |
sleep 1 |
209 |
done |
210 |
! [[ -S "${socket}" ]] && eerror "MySQL NOT started, proceding anyway" |
211 |
eend $retstatus |
212 |
} |
213 |
|
214 |
stop () { |
215 |
getconfig |
216 |
ebegin "Stopping mysqld (${MY_CNF})" |
217 |
start-stop-daemon --stop --retry 5 --quiet --pidfile=${pidfile} |
218 |
eend $? |
219 |
} |
220 |
localhost mysql # [/code] |
221 |
|
222 |
I really hope that someone can help me fix this. |
223 |
-- |
224 |
gentoo-user@g.o mailing list |