WINDOWS主机mysql更改ROOT口令&建库&用户

  • 来源: 黑吧安全网 作者: 戴九军   2011-05-06/14:14
  • 改ROOT口令

    1.net stop mysql //停MYSQ服务

    2.CD 到mysql bin目录下mysqld-nt --skip-grant-tables //启动MYSQL

    3.DOS下mysql mysql //登录到mysql库

    4.update user set password =PASSWORD("fuck") where user='root'

    5.FLUSH PRIVILEGES;

    建库

    1.create database xx;

    2.FLUSH PRIVILEGES;

    建用户

    1.insert into mysql.user(Host,User,Password,ssl_cipher,x509_issuer,x509_subject) values("localhost","username",PASSWORD("password"),'','','');

    2.grant all privileges on xx.* to username@localhost identified by 'password'

    3.FLUSH PRIVILEGES;


    评论 {{userinfo.comments}}

    {{money}}

    {{question.question}}

    A {{question.A}}
    B {{question.B}}
    C {{question.C}}
    D {{question.D}}
    提交

    驱动号 更多