MySQL的binary distribution一定要有mysql账户吗

dreamhunter_lan 2011-12-27 06:58:07
运行scripts/mysql_install_db的时候已经加上--user=我的账户名,运行出现:

111228 1:54:43 [Warning] Ignoring user change to 'hduser' because the user was set to 'mysql' earlier on the command line

111228 1:54:43 [ERROR] Fatal error: Can't change to run as user 'mysql' ; Please check that the user exists!

之前装过貌似没这个问题
...全文
116 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
rucypli 2011-12-28
  • 打赏
  • 举报
回复
去掉--user=这个试试
dreamhunter_lan 2011-12-28
  • 打赏
  • 举报
回复
[Quote=引用楼主 dreamhunter_lan 的回复:]
运行scripts/mysql_install_db的时候已经加上--user=我的账户名,运行出现:

111228 1:54:43 [Warning] Ignoring user change to 'hduser' because the user was set to 'mysql' earlier on the command line

111228 1:54:43 [ER……
[/Quote]
没有,我都有点不清楚是怎么回事,我是照着manual来的
yq510457 2011-12-28
  • 打赏
  • 举报
回复
你修改过账户或权限?
dreamhunter_lan 2011-12-28
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 rucypli 的回复:]

去掉--user=这个试试
[/Quote]
之前没有mysql用户和mysql组,我跑mysql_install_db的时候加上了--user和--basedir,都出错了(其中一次大概是说找不到/var/run/mysqld/mysqld.sock),最后添加了mysql用户和组,修改了下/etc/mysql/my.cnf的basedir和datadir,在root下安装,一切正常了。我的修改如下:
basedir = /usr/local/mysql
datadir = /usr/local/mysql/data

最终觉得应该是一些权限方面的问题,这个问题我第二次碰到了,这次想不起来。

顺便说一点,ubuntu下会出现于libaio1相关的错误,用sudo apt-get install libaio1下再跑就好了

56,687

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧