命令不能使用的问题
时间:2010-08-28
来源:互联网
现在有个奇怪的问题,在安装mysql的时候,我在终端下以root身份进入后,groupadd,这些命令不能用。
chenchen#addgroup mysql
command not found
不知道是不是权限还有问题。请问该如何解决呢?
chenchen#addgroup mysql
command not found
不知道是不是权限还有问题。请问该如何解决呢?

作者: chenyi816 发布时间: 2010-08-28
加组的命令是:pw groupadd
或者:#vi /etc/group
直接自己手动加
或者:#vi /etc/group
直接自己手动加
作者: wellwong 发布时间: 2010-08-28
我是按照mysql用户手册做的。
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
但第一步就做不出来了,有种说法是权限的问题。要以root的权限
bash: groupadd: command not found
这是一种解决方案:[xiangdong2@101/udp ~]$ whoami
xiangdong2
[xiangdong2@101/udp ~]$ sudo -s
[root@101/udp ~]# su - root
[root@101/udp ~]# groupadd mysql
但我试过,不行。。。
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
但第一步就做不出来了,有种说法是权限的问题。要以root的权限
bash: groupadd: command not found
这是一种解决方案:[xiangdong2@101/udp ~]$ whoami
xiangdong2
[xiangdong2@101/udp ~]$ sudo -s
[root@101/udp ~]# su - root
[root@101/udp ~]# groupadd mysql
但我试过,不行。。。

作者: chenyi816 发布时间: 2010-08-28
如果哪位知道mysql的安装步骤,麻烦给个。我的命令好像就是用不上,也不能编译。铁定哪有问题。

作者: chenyi816 发布时间: 2010-08-28
你那个mysql用户手册是linux的吧,有些命令不太一样,其实你要安装mysql的话,用ports最简单了
#cd /usr/ports/databases/mysql50-server
#make install clean
#nano /etc/rc.conf
mysql_enable="YES"
#cp /usr/local/share/mysql/my-huge.cnf /usr/local/etc/my.cnf
#/usr/local/bin/mysql_install_db --user=mysql
#cp /usr/local/etc/rc.d/mysql-server /usr/local/etc/rc.d/mysql.sh
#/usr/local/etc/rc.d/mysql-server start
#cd /usr/ports/databases/mysql50-server
#make install clean
#nano /etc/rc.conf
mysql_enable="YES"
#cp /usr/local/share/mysql/my-huge.cnf /usr/local/etc/my.cnf
#/usr/local/bin/mysql_install_db --user=mysql
#cp /usr/local/etc/rc.d/mysql-server /usr/local/etc/rc.d/mysql.sh
#/usr/local/etc/rc.d/mysql-server start
作者: wellwong 发布时间: 2010-08-28
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28