免费注册 查看新帖 |

Chinaunix

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

【讨论中】求助gentoo下安装mysql5.1 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-01-23 08:41 |只看该作者 |倒序浏览
本帖最后由 cenalulu 于 2013-01-24 11:33 编辑

gentoo2.6 命令界面,安装mysql5.1,按照网上的教程,我用二进安装,但是初始化数据库的时候,scripsts/mysql_install_db--user=root,我的目录中是mysql_imstall_db.sh,就卡在这一步,我下的数据库大下为23M左右,现在官方好像已经不能下。我是 google出来下载的,现在不知道问题出在哪里,知道的朋友告诉我一下,谢谢!

论坛徽章:
4
CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52戌狗
日期:2013-12-27 15:08:11
2 [报告]
发表于 2013-01-23 09:34 |只看该作者
报什么错误呢

论坛徽章:
0
3 [报告]
发表于 2013-01-23 09:54 |只看该作者
回复 2# 小版主杀手


# ./mysql_install_db.sh

FATAL ERROR: Could not find @bindir@/my_print_defaults

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.
文档是要求步骤是这样的:
shell> groupadd mysql
shell> useradd -r -g mysql mysql
shell> cd /usr/local
shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
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
# Next command is optional
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server

我的安装包中的scripts中的文件mysql_install_db是带有SH的,就进行不下去了

# ./mysql_install_db --user=mysql
-bash: ./mysql_install_db: No such file or directory

scripts # ./mysql_install_db.sh --user=mysql

FATAL ERROR: Could not find @bindir@/my_print_defaults

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.
我的系统版本为:Linux syscout 2.6.17-gentoo-r7

论坛徽章:
4
CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52戌狗
日期:2013-12-27 15:08:11
4 [报告]
发表于 2013-01-23 10:07 |只看该作者
zixing23 发表于 2013-01-23 09:54
回复 2# 小版主杀手

上面的提示:--basedir option
pointing to that location.
指定安装路径,数据存放路径
scripts/mysql_install_db.sh --user=mysql --basedir=xxxx --datadir=/xxx

论坛徽章:
0
5 [报告]
发表于 2013-01-23 10:22 |只看该作者
回复 4# 小版主杀手

我的安装包路径是在/root/mysql-5.1.62 程序打算安装在/usr/local/mysql,数据存放在/var/lib/mysql。提示如下错误:
    scripts # ./mysql_install_db.sh --user=mysql --basedir=/root/mysql-5.1.62/ --datadir=/var/lib/mysql

FATAL ERROR: Could not find my_print_defaults

The following directories were searched:

    /root/mysql-5.1.62//bin
    /root/mysql-5.1.62//extra

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
6 [报告]
发表于 2013-01-23 10:29 |只看该作者
回复 4# 小版主杀手


    还有就是我把安装包也拷到了/usr/local/mysql目录下,把安装路径指向了/usr/local/mysql也一样不行

论坛徽章:
4
CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52戌狗
日期:2013-12-27 15:08:11
7 [报告]
发表于 2013-01-23 10:36 |只看该作者
zixing23 发表于 2013-01-23 10:29
回复 4# 小版主杀手

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
8 [报告]
发表于 2013-01-23 10:37 |只看该作者
回复 7# 小版主杀手


    我是网上下的,mysql5.1 for linux的,怎么去看如何是源码包?我的包不解压只有23M

论坛徽章:
0
9 [报告]
发表于 2013-01-23 10:38 |只看该作者
回复 7# 小版主杀手


    官方不能下载,只能下载for windows的.我的下的包是google里弄出来的

论坛徽章:
4
CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52戌狗
日期:2013-12-27 15:08:11
10 [报告]
发表于 2013-01-23 10:47 |只看该作者
zixing23 发表于 2013-01-23 10:38
回复 7# 小版主杀手

源码包的话
进入解压目录
./configure --prefix=/usr/local/mysql --with-charsets=utf8 --with-extra-charsets=all --datadir=/var/lib/mysql
.make && make install
.cp  support-files/my-medium.cnf /etc/my.cnf
./mysql_install_db --user=mysql --datadir=/var/lib/mysql;
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP