试试:1. groupadd mysql
2. useradd -g mysql mysql          //添加一个Linux用户
3. cd /mysqlpath
4. chown -R root .
5. chown -R mysql data
6. chgrp -R mysql .然后运行mysql服务

解决方案 »

  1.   

    mysql安装成功后,系统应该都会自动加入mysql用户啊。
    没看清错误原因,你只要贴错误的提示就好了。
      

  2.   

    从提示来看,好像是mysql用户不存在或者它的权限不够。
      

  3.   

    :)二进制安装时不会自动添加mysql用户
      

  4.   

    按照下面步骤做,就可以了
         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> scripts/mysql_install_db
         shell> chown -R root  .
         shell> chown -R mysql data
         shell> chgrp -R mysql .
         shell> bin/mysqld_safe --user=mysql &
      

  5.   

    各位老大,我是新学LINUX的,我用 groupadd mysql密令怎么告诉我groupadd密令不存在?
    bash: groupadd: command not found
    ?????
    谢谢各位帮我解决.
      

  6.   

    很奇怪.从普通用户用su转到超级用户好多命令都用不了,包括groupadd useradd还有fdisk什么的,都用不了,只能用root登陆才行.为什么?
      

  7.   

    spng(sinpy)兄,按照你的方法,每次运行到 
    bin/mysqld_safe --user=mysql & 这步时都出现以下提示:[1] 1790
    [root@localhost mysql-standard-4.0.15-pc-linux-i686]# Starting mysqld daemon with databases from /var/lib/mysql
    031007 23:12:52  mysqld ended
    去掉这行显示:
    ............
    You can start the MySQL daemon with:
    cd . ; ./bin/mysqld_safe &You can test the MySQL daemon with the benchs in the 'sql-bench' directory:
    cd sql-bench ; perl run-all-testsPlease report any problems with the ./bin/mysqlbug script!The latest information about MySQL is available on the web at
    http://www.mysql.com
    Support MySQL by buying support/licenses at https://order.mysql.comStarting the mysqld server.  You can test that it is up and running
    with the command:
    ./bin/mysqladmin version
    [root@localhost mysql-standard-4.0.15-pc-linux-i686]# Starting mysqld daemon with databases from /var/lib/mysql
    031007 23:10:40  mysqld ended