windows 8 - Shutting down mysqld in Cygwin -


how supposed shutdown mysqld faster cygwin (without killing process in task manager) , prevent these errors?

this how started it:

$ /usr/bin/mysqld_safe & [1] 4440  chloe@xps ~ $ 130809 17:27:09 mysqld_safe logging '/var/lib/mysql/xps.err'. chown: invalid user: `mysql' 130809 17:27:10 mysqld_safe starting mysqld daemon databases /var/lib/mysql 

when try shut down, prints forever , won't respond ^c:

$ /usr/sbin/mysqld.exe shutdown 130809 17:29:26 [warning] setting lower_case_table_names=2 because file system /var/lib/mysql/ case insensitive 130809 17:29:26 [note] plugin 'federated' disabled. 130809 17:29:26 innodb: innodb memory heap disabled 130809 17:29:26 innodb: mutexes , rw_locks use gcc atomic builtins 130809 17:29:26 innodb: compressed tables use zlib 1.2.7 130809 17:29:26 innodb: initializing buffer pool, size = 128.0m 130809 17:29:26 innodb: completed initialization of buffer pool innodb: unable lock ./ibdata1, error: 11 innodb: check not have mysqld process innodb: using same innodb data or log files. 130809 17:29:26  innodb: retrying lock first data file innodb: unable lock ./ibdata1, error: 11 innodb: check not have mysqld process innodb: using same innodb data or log files. 

it pretends shut down after 3 minutes of printing errors repeatedly, doesn't shut down because still in task manager , ps list. don't think should take long.

130809 17:31:06 [note] /usr/sbin/mysqld: shutdown complete 

i tried

$ mysqladmin shutdown 

but appears hang.

i know user found how shutdown mysql, had same issue , first hit on google.

the trick add host as ip address , user on command (if used localhost host, command hang up).

 mysqladmin.exe -h 127.0.0.1 -u root shutdown 

@chloe there few of scenarios might not work. 2 common think if mysql bound different ip or if it's bound different port (the other scenarios if mysql not using tcp, 1 of other transport protocols).

so, example, after run mysqld_safe & , mysql starts, when run command netstat can see it's listening , on default port 3306

$ netstat -an | grep 3306 

i hope helps!


edit

if mysql not running, you'll need provide connection timeout (--connect-timeout=n) default mysqladmin waits forever connect server. example, if mysql not running

$ mysqladmin.exe -h 127.0.0.1 -u root --connect-timeout=5 shutdown  mysqladmin: connect server @ '127.0.0.1' failed error: 'can't connect mysql server on '127.0.0.1' (4)' check mysqld running on 127.0.0.1 , port 3306. can check doing 'telnet 127.0.0.1 3306' 

here, command waits 5 seconds before giving up. point of view, doesn't make sense waits forever, that's default mysql picked :s.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -