05年再次实践:
如果没有问题,再次关闭后推入后台:
/usr/local/mysql/bin/mysqld_safe --user=root &
停止:
确定停止?:
root 4121 0.0 0.0 5800 2488 pts/35 S+ 16:22 0:00 mysql
gastonwu 5365 0.0 0.0 5192 2256 pts/67 S+ Aug24 0:00 mysql -u root -p
root 5844 0.0 0.0 5800 2516 pts/28 S+ 16:28 0:00 mysql -uwiki -p wiki -hlocalhost
root 11169 0.0 0.0 2768 744 pts/49 S+ 16:46 0:00 grep mysql
root 15169 0.0 0.0 5844 2712 pts/8 S+ Sep23 0:00 mysql
gastonwu 18138 0.0 0.0 5188 2276 pts/91 S+ Aug25 0:00 mysql -u root -p DB_DemoSoapp
root 23843 0.0 0.0 5800 2584 pts/27 S+ 15:40 0:00 mysql
root 27623 0.0 0.0 5800 2568 pts/99 S+ 14:08 0:00 mysql
启动:
Starting mysqld daemon with databases from /usr/local/mysql/data[1]+ Stopped /bin/sh /usr/local/mysql/bin/mysqld_safe --user=root
客户端登陆:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.27-max
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
如果已经连上后,重启后会出现:
当然,用pkill 杀mysql的进程也是也可以的,呵呵!
如果没有问题,再次关闭后推入后台:
/usr/local/mysql/bin/mysqld_safe --user=root &
mysqladmin -u root shutdown
停止:
[/usr/local/mysql/bin]# mysqladmin -u root shutdown
确定停止?:
[/usr/local/mysql/bin]# ps axu|grep mysql
root 4121 0.0 0.0 5800 2488 pts/35 S+ 16:22 0:00 mysql
gastonwu 5365 0.0 0.0 5192 2256 pts/67 S+ Aug24 0:00 mysql -u root -p
root 5844 0.0 0.0 5800 2516 pts/28 S+ 16:28 0:00 mysql -uwiki -p wiki -hlocalhost
root 11169 0.0 0.0 2768 744 pts/49 S+ 16:46 0:00 grep mysql
root 15169 0.0 0.0 5844 2712 pts/8 S+ Sep23 0:00 mysql
gastonwu 18138 0.0 0.0 5188 2276 pts/91 S+ Aug25 0:00 mysql -u root -p DB_DemoSoapp
root 23843 0.0 0.0 5800 2584 pts/27 S+ 15:40 0:00 mysql
root 27623 0.0 0.0 5800 2568 pts/99 S+ 14:08 0:00 mysql
启动:
[/usr/local/mysql/bin]# /bin/sh /usr/local/mysql/bin/mysqld_safe --user=root
Starting mysqld daemon with databases from /usr/local/mysql/data[1]+ Stopped /bin/sh /usr/local/mysql/bin/mysqld_safe --user=root
客户端登陆:
[/usr/local/mysql/bin]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.27-max
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
如果已经连上后,重启后会出现:
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 2
Current database: *** NONE ***
No connection. Trying to reconnect...
Connection id: 2
Current database: *** NONE ***
当然,用pkill 杀mysql的进程也是也可以的,呵呵!
作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:http://jackxiang.com/post/3531/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
最后编辑: jackxiang 编辑于2015-6-16 13:29
评论列表