免费注册 查看新帖 |

Chinaunix

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

MYSQL启动不了,不知道是啥原因。在UBUNTU下。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-07-07 22:33 |只看该作者 |倒序浏览
报错如下:
strings /var/log/mysql/mysql-bin.000018
bin"!rH
5.0.51a-3ubuntu5.1-log
"!rH
"!rH
希望 高人帮助。感谢。。

论坛徽章:
0
2 [报告]
发表于 2008-07-08 01:12 |只看该作者
原帖由 帅的不能再输啦 于 2008-7-7 22:33 发表
报错如下:
strings /var/log/mysql/mysql-bin.000018
bin"!rH
5.0.51a-3ubuntu5.1-log
"!rH
"!rH
希望帮助。感谢。。



mysql-bin.000018不是日志, 是用于多服务器复制的binlog,

错误日志要看 /var/log/mysql.err这样的文件,或者直接看 /var/log/syslog

binlog用mysqlbinlog命令来看。

论坛徽章:
0
3 [报告]
发表于 2008-07-08 09:26 |只看该作者
data/hostname.err

论坛徽章:
0
4 [报告]
发表于 2008-07-08 17:00 |只看该作者
要看你的错误日志才行的。

论坛徽章:
0
5 [报告]
发表于 2008-07-08 20:45 |只看该作者

................

打开/var//log/mysql.err里边是空,啥也不有。
/var/log/syslog中有如下的提示:
Jul  8 20:39:10 ghh-desktop mysqld_safe[4744]: started
Jul  8 20:39:13 ghh-desktop mysqld[4748]: 080708 20:39:13  InnoDB: Started; log sequence number 0 43655
Jul  8 20:39:13 ghh-desktop mysqld[4748]: 080708 20:39:13 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
Jul  8 20:39:13 ghh-desktop mysqld[4748]: 080708 20:39:13 [ERROR] Do you already have another mysqld server running on port: 3306 ?
Jul  8 20:39:13 ghh-desktop mysqld[4748]: 080708 20:39:13 [ERROR] Aborting
Jul  8 20:39:13 ghh-desktop mysqld[4748]:
Jul  8 20:39:13 ghh-desktop mysqld[4748]: 080708 20:39:13  InnoDB: Starting shutdown...
Jul  8 20:39:16 ghh-desktop mysqld[4748]: 080708 20:39:16  InnoDB: Shutdown completed; log sequence number 0 43655
Jul  8 20:39:16 ghh-desktop mysqld[4748]: 080708 20:39:16 [Note] /usr/sbin/mysqld: Shutdown complete
Jul  8 20:39:16 ghh-desktop mysqld[4748]:
Jul  8 20:39:16 ghh-desktop mysqld_safe[4808]: ended
Jul  8 20:39:25 ghh-desktop /etc/init.d/mysql[4908]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Jul  8 20:39:25 ghh-desktop /etc/init.d/mysql[4908]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
Jul  8 20:39:25 ghh-desktop /etc/init.d/mysql[4908]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Jul  8 20:39:25 ghh-desktop /etc/init.d/mysql[4908]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Jul  8 20:39:25 ghh-desktop /etc/init.d/mysql[4908]:

论坛徽章:
0
6 [报告]
发表于 2008-07-08 20:52 |只看该作者
ghh@ghh-desktop:~$ sudo /etc/init.d/mysql restart
* Stopping MySQL database server mysqld                                                                                                               [ OK ]
* Starting MySQL database server mysqld                                                                                                               [fail]

ghh@ghh-desktop:~$ tail -f /var/log/syslog
Jul  8 20:51:38 ghh-desktop mysqld[6080]: 080708 20:51:38  InnoDB: Starting shutdown...
Jul  8 20:51:41 ghh-desktop mysqld[6080]: 080708 20:51:41  InnoDB: Shutdown completed; log sequence number 0 43655
Jul  8 20:51:41 ghh-desktop mysqld[6080]: 080708 20:51:41 [Note] /usr/sbin/mysqld: Shutdown complete
Jul  8 20:51:41 ghh-desktop mysqld[6080]:
Jul  8 20:51:41 ghh-desktop mysqld_safe[6110]: ended
Jul  8 20:51:53 ghh-desktop /etc/init.d/mysql[6240]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Jul  8 20:51:53 ghh-desktop /etc/init.d/mysql[6240]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
Jul  8 20:51:53 ghh-desktop /etc/init.d/mysql[6240]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Jul  8 20:51:53 ghh-desktop /etc/init.d/mysql[6240]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Jul  8 20:51:53 ghh-desktop /etc/init.d/mysql[6240]:

[ 本帖最后由 帅的不能再输啦 于 2008-7-8 20:54 编辑 ]

论坛徽章:
0
7 [报告]
发表于 2008-07-08 23:08 |只看该作者
Jul  8 20:39:13 ghh-desktop mysqld[4748]: 080708 20:39:13 [ERROR] Do you already have another mysqld server running on port: 3306 ?

先确定你的mysql所用的配置文件my.cnf是哪一个

之后查看一下里面启动的mysql端口是什么,因为报错内容明显的说明你的系统上还有一个mysql在使用3306端口,不妨修改一下配置文件里的mysql端口号,之后将这个配置文

件中的socket改成与先前已经装好的mysql不同的socket文件位置,之后再重新试一下

拙见

论坛徽章:
0
8 [报告]
发表于 2008-07-09 12:23 |只看该作者
从你的错误信息来看,有两点需要解决。
第一:可能已经有某个进程占用了3306这个端口,更改你的端口试一下,很有可能是另外一个mysqld已经在运行;
第二:第二,使用socket登陆的时候,确认你使用的哪一个socket。可以使用mysql -h host_name -P port_number看看能不能使用tcp登陆上去。

论坛徽章:
0
9 [报告]
发表于 2008-07-09 12:26 |只看该作者
原帖由 ProfessorTian 于 2008-7-8 23:08 发表
Jul  8 20:39:13 ghh-desktop mysqld[4748]: 080708 20:39:13 [ERROR] Do you already have another mysqld server running on port: 3306 ?

先确定你的mysql所用的配置文件my.cnf是哪一个

之后查看一下里 ...

谢谢.谢谢.是这个问题造成的.

论坛徽章:
0
10 [报告]
发表于 2008-07-09 16:46 |只看该作者
把端口改成其他的,然后启动MYSQL,再停止掉,改端口回来,再启动数据库就可以了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP