在端口3306上运行的另一个mysqld服务器错误

编程入门 行业动态 更新时间:2024-10-26 23:27:41
本文介绍了在端口3306上运行的另一个mysqld服务器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经在Mac OS X 10.7 Lion上安装了Mysql 5.1.但是由于某种原因,当我尝试使用"mysqld"命令启动服务器时,在日志文件中显示错误:

I have installed Mysql 5.1 on Mac OS X 10.7 Lion. For some reason, though, when I try starting the server with the command "mysqld" I get an error in the log file which says:

120328 21:32:40 [错误]无法启动服务器:在TCP/IP端口上绑定:地址已在使用中

120328 21:32:40 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use

120328 21:32:40 [错误]您是否已经在端口3306上运行了另一个mysqld服务器?

120328 21:32:40 [ERROR] Do you already have another mysqld server running on port: 3306 ?

120328 21:32:40 [ERROR]正在中止

120328 21:32:40 [ERROR] Aborting

如果我在终端中运行"netstat -nat | grep 3306",则会得到以下信息: tcp4 0 0 * .3306 .听

If I run "netstat -nat | grep 3306" in my terminal, I get the following: tcp4 0 0 *.3306 . LISTEN

更新:

所以这是输出. mysqld 24645 sb1752 12u IPv4 0xffffff8010f6bde0 0t0 TCP *:mysql(LISTEN)

So here's the output for that. mysqld 24645 sb1752 12u IPv4 0xffffff8010f6bde0 0t0 TCP *:mysql (LISTEN)

这很奇怪!因为我的mysql服务器没有启动. 当我在命令行中键入"mysql"时,它说 错误2002(HY000):无法通过套接字'/tmp/mysql.sock'(2)连接到本地MySQL服务器

This is odd though! Because my mysql server is not started. When I type "mysql" in command line, it says ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

我确实安装了其他版本的mysql,并且今天早些时候已卸载.知道在这里做什么吗?

I did install other version of mysql and uninstalled earlier today. Any idea what to do here?

推荐答案

您可以使用netstat -lp | grep 3306找出端口3306上已经在侦听的程序(您应该在最后一栏中看到PID/程序名称)并停止该程序(也许mysql已经在运行?).

You could use netstat -lp | grep 3306 to find out what program is already listening on port 3306 (you should see PID/Program name in last column) and stop that (maybe mysql is already running?).

或者,您可以在其他端口上启动新安装的服务器. (编辑myf并在此处更改默认端口)

Alternatively you could start the newly installed server on a different port. (edit myf and change the default port there)

更多推荐

在端口3306上运行的另一个mysqld服务器错误

本文发布于:2023-08-07 10:41:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1318678.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:端口   错误   服务器   mysqld

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!