mysql安装后无法启动的问题

我是从源码安装的,版本5.5.32编译:shell>cmake.-DCMAKE_INSTALL_PREFIX=/usr/local/mysqlshell>makeshel... 我是从源码安装的,版本5.5.32

编译:
shell> cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql
shell> make
shell> make install
配置:
shell> cd /usr/local/mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
shell> chown -R root .
shell> chown -R mysql data
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
出现的错误:
[1] 11508
root@localhost:/usr/local/mysql# 130702 14:14:32 mysqld_safe Logging to '/usr/local/mysql/data/localhost.err'.
130702 14:14:32 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
130702 14:14:34 mysqld_safe mysqld from pid file /usr/local/mysql/data/localhost.pid ended

[1]+ Done bin/mysqld_safe --user=mysql
从localhost.err文件中查到的具体错误是:
130702 14:14:32 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
130702 14:14:32 InnoDB: The InnoDB memory heap is disabled
130702 14:14:32 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130702 14:14:32 InnoDB: Compressed tables use zlib 1.2.3
130702 14:14:32 InnoDB: Initializing buffer pool, size = 128.0M
130702 14:14:32 InnoDB: Completed initialization of buffer pool
130702 14:14:32 InnoDB: highest supported file format is Barracuda.
130702 14:14:33 InnoDB: Waiting for the background threads to start
130702 14:14:34 InnoDB: 5.5.32 started; log sequence number 1595675
130702 14:14:34 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
130702 14:14:34 [Note] - '0.0.0.0' resolves to '0.0.0.0';
130702 14:14:34 [ERROR] Failed to create a socket for IPv4 '0.0.0.0': errno: 13.
130702 14:14:34 [ERROR] Can't create IP socket: Permission denied
130702 14:14:34 [ERROR] Aborting

130702 14:14:34 InnoDB: Starting shutdown...
130702 14:14:34 InnoDB: Shutdown completed; log sequence number 1595675
130702 14:14:34 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

遇到这个情况后不知道如何处理,希望高手给些指导,谢谢!
展开
 我来答
ffcz
2013-07-02 · TA获得超过1221个赞
知道小有建树答主
回答量:757
采纳率:71%
帮助的人:751万
展开全部
130702 14:14:34 [ERROR] Failed to create a socket for IPv4 '0.0.0.0': errno: 13.
130702 14:14:34 [ERROR] Can't create IP socket: Permission denied
130702 14:14:34 [ERROR] Aborting

建立socket失败,权限被拒绝,中断。
检查一下你的3306是不是有程序占用了。

netstat -an| grep :3306

同时执行这个一下,我看你有 “chown -R root .”
chown -R mysql:mysql /usr/local/mysql
更多追问追答
追问
执行netstat -an| grep :3306后没有输出,应该是没有占用,

chown -R mysql:mysql /usr/local/mysql后
结果还是有那个错误
追答
查看一下 /etc/my.cnf
tmpdir
socket
对应的目录都要有写的权限。
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式