[root@redhat var]# uname -a Linux xxx 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux [root@redhat var]# mysql -u root -p -e “select version();” +------------+ | version() | +------------+ | 5.1.32-log | +------------+
[root@redhat var]# /var/lib/mysql/libexec/mysqld restart ----操作① 100708 14:43:53 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root! 100708 14:43:53 [ERROR] Aborting 100708 14:43:53 [Note] /var/lib/mysql/libexec/mysqld: Shutdown complete
[root@redhat var]# service mysql restart ----操作② MySQL manager or server PID file could not be found! [FAILED] Starting MySQL......
[root@redhat var]# ps aux | grep mysql
100708 15:26:52 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use 100708 15:26:52 [ERROR] Do you already have another mysqld server running on port: 30017 ? 100708 15:26:52 [ERROR] Aborting
[root@redhat var]# mysql -u root -p
Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[root@redhat var]# service mysql stop MySQL is running but PID file could not be found
[root@redhat var]# top <shift+m 按内存使用排序> <1 显示cpu使用情况>
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 和MySQL manager or server PID file could not be found! [FAILED]
[root@redhat var]# diff /etc/my.cnf /etc/my.cnf.bak
[root@redhat var]# diff /etc/my.cnf /etc/my.cnf.bak
#切换到mysql data dir(mysql的数据文件目录下) #你们的mysql data dir或许跟我的不一样哦,我的是/var/lib/mysql/var/ [root@redhat var]# cd /var/lib/mysql/var/
[root@redhat var]# echo `ps aux | grep mysql | grep "user=mysql" | grep -v "grep" | awk '{print $2}'`>> redhat.pid
#注意这里的redhat.pid跟hostname相关,这里是我的hostname.pid
[root@redhat var]# chown mysql:mysql redhat.pid
[root@redhat var]# mysql -u root -p
Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[root@redhat var]# ls /tmp | grep sock
[root@redhat var]# service mysql status
MySQL running (10949) [ OK ]
[root@redhat var]# service mysql restart Shutting down MySQL. [ OK ] Starting MySQL. [ OK ]
[root@redhat var]# ls /tmp | grep sock
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有