免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2444 | 回复: 3
打印 上一主题 下一主题

mysql启动问题,急救!!! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-05-20 16:10 |只看该作者 |倒序浏览
我以前一直在用的mysql崩溃了(
而且用/etc/rc.d/init.d/mysqld start  failed
进程中已经没有mysql的进程
用mysqladmin version显示
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
#ls -l /var/lib/mysql/
发现 mysql.sock 为0字节
/tmp 下没有mysql.sock 文件
用safe_mysqld 也不成
把mysql卸掉重装也是老样子



注:我用的是redhat7.3,先装apache-1.3+php-4.12(和系统一起安装) 后来用rpm装mysql-3.23,还装了phpmyadmin,曾运行过一段时间,没出现问题

论坛徽章:
0
2 [报告]
发表于 2003-05-20 16:42 |只看该作者

mysql启动问题,急救!!!

在mysqldb.err中有記錄出錯的信息嗎?
可以重做MY.CNF試試。

因為從你的描述中實在找不到出錯的理由 :)

论坛徽章:
0
3 [报告]
发表于 2003-05-20 16:52 |只看该作者

mysql启动问题,急救!!!

谢谢二楼的回复!
再加一句
/etc/rc.d/init.d/mysqld status

mysqld dead but subsys locked

以下是my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log     #里面无内容
pid-file=/var/run/mysqld/mysqld.pid  #此文件不存在

以下为/var/log/mysqld.log.1文件里的末尾几行

lock: 84a621c:

lock: 83e49d4:

lock: 8425064:

lock: 852f964:

lock: 85a3684:

lock: 847ac1c:

lock: 846cbc4:

lock: 840368c:

lock: 8431f4c:

lock: 8464924:

key_cache status:
blocks used:      1640
not flushed:         0
w_requests:      20649
writes:          17043
r_requests:    1252665
reads:            1112

handler status:
read_key:       236819
read_next:      125745
read_rnd        218518
read_first:      19805
write:           15880
delete             426
update:          15154

Table status:
Opened tables:       3208
Open tables:           64
Open files:           123
Open streams:           0
030520 11:22:24  /usr/libexec/mysqld: Normal shutdown

030520 11:22:24  /usr/libexec/mysqld: Shutdown Complete

论坛徽章:
0
4 [报告]
发表于 2003-05-21 00:08 |只看该作者

mysql启动问题,急救!!!

[root@jiajia root]# cd /usr/bin
[root@jiajia bin]# ./mysql_install_db

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
/usr/bin/mysqladmin -u root password 'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at http://www.mysql.com
Support MySQL by buying support/licenses at http://www.tcx.se/license.htmy.

[root@jiajia bin]# ./safe_mysqld
Starting mysqld daemon with databases from /var/lib/mysql
mysqld daemon ended
[root@jiajia bin]# ./mysqladmin version
./mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP