linux是我装的,手里有root帐号,但是mysql是别人装的,root帐号给搞没了,请问能否使用linux的root权限获得mysql的root权限?

解决方案 »

  1.   

    亲自用过,步骤简单不爱写,抄自网上:
    1.用root或者运行mysqld的用户登录系统;
    2.利用kill命令结束掉mysqld的进程;
    3.使用--skip-grant-tables参数启动MySQL Server
    shell>mysqld_safe --skip-grant-tables &
    4.为root@localhost设置新密码
    shell>mysqladmin -u root flush-privileges password "newpassword"
    5.重启MySQL Server
      

  2.   

    参考下贴三楼
    http://topic.csdn.net/u/20090515/21/2b3c9a12-d8a5-4bb1-9895-6069cef5aef8.html