免费注册 查看新帖 |

Chinaunix

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

为什么我安装 mysql出错 ? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-06-11 10:20 |只看该作者 |倒序浏览
在 ubuntu下安装mysql-5.1.33-linux-i686-icc-glibc23



提示

administrator@ubuntu:/usr/local/mysql$ scripts/mysql_install_db --user=mysql

FATAL ERROR: Could not find mysqld

The following directories were searched:

    /usr/libexec
    /usr/sbin
    /usr/bin

If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.

administrator@ubuntu:/usr/local/mysql$ sudo scripts/mysql_install_db --user=mysql

FATAL ERROR: Could not find mysqld

The following directories were searched:

    /usr/libexec
    /usr/sbin
    /usr/bin

If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.




怎么办呢?

论坛徽章:
0
2 [报告]
发表于 2009-06-11 10:29 |只看该作者
解压后 看readme 文件!

论坛徽章:
0
3 [报告]
发表于 2009-06-11 10:38 |只看该作者
怪了

我按照安装文档的

shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &

执行,到 scripts/mysql_install_db --user=mysql 的时候还是报错

论坛徽章:
0
4 [报告]
发表于 2009-06-11 10:44 |只看该作者
bin/mysql_install_db --user=mysql --basedir=/usr/local/mysql
试试

[ 本帖最后由 聪明笨小孩 于 2009-6-11 10:49 编辑 ]

论坛徽章:
0
5 [报告]
发表于 2009-06-11 10:49 |只看该作者
administrator@ubuntu:/usr/local/mysql$ sudo /usr/bin/mysql_install_db  --user=mysql  
sudo: /usr/bin/mysql_install_db: command not found


仍然不行

论坛徽章:
0
6 [报告]
发表于 2009-06-11 10:53 |只看该作者
原帖由 聪明笨小孩 于 2009-6-11 10:44 发表
bin/mysql_install_db --user=mysql --basedir=/usr/local/mysql
试试



在什么目录下执行这条命令呢?

论坛徽章:
0
7 [报告]
发表于 2009-06-11 10:54 |只看该作者
find  /   -name  "mysql_install_db"



mysql_install_db   --user=mysql  --basedir=/usr/local/mysql

如果还有问题,也许是以前在其他地方或通过其他方式安装过,把以前的卸载掉!

论坛徽章:
0
8 [报告]
发表于 2009-06-11 11:00 |只看该作者
太怪异了


administrator@ubuntu:/usr/local/mysql/scripts$ ls
mysql_install_db
administrator@ubuntu:/usr/local/mysql/scripts$ sudo mysql_install_db  --user=mysql  --basedir=/usr/local/mysql
sudo: mysql_install_db: command not found

怎么会这样的

论坛徽章:
0
9 [报告]
发表于 2009-06-11 11:09 |只看该作者
当前目录下应该用:
./mysql_install_db  --user=mysql  --basedir=/usr/local/mysql  


个人认为 安装软件还是用绝对路径好点!
实在不行,删除重新安装,或换个计算机,或重新启动系统!呵呵

论坛徽章:
0
10 [报告]
发表于 2009-06-11 11:11 |只看该作者
我 和谐, 原来忘了加 ./

我真是晕了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP