• centos 7.2 安装mysql 修改 初始密码


    # /etc/init.d/mysqld stop

    # mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
    # mysql -u root mysql 【这一步 就进入mysql数据库了 进入数据库   跟着 ②操作】

    {   mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
              mysql> FLUSH PRIVILEGES;
             mysql> quit


    # /etc/init.d/mysqld restart
    # mysql -uroot -p
    Enter password: <输入新设的密码newpassword>
    mysql>

    ② mysql>update mysql.user set authentication_string= password ('guo') WHERE User='root';        #更改密码为 guo

        mysql>flush privileges; #更新权限

        mysql>quit #退出
        service mysql start

    以上操作  在数据库中操作   会提示   

    ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.  需要用   ALTER USER  语句加密码 重置

       

    这一步这样操作

    'guo'   便是 你设置的新密码

  • 相关阅读:
    contest9 CF295 div1 ooxx? ooox? oooo?
    The 8KB bug
    简单消息框架
    示例页面
    Unity3d中角色模型和角色名字保持相对位置
    Unityd外发光Shader Lab
    Unity3D判断当前所在平台
    Unity3D中的shader基础知识
    Sql Server 分区
    MVC 使用缓存
  • 原文地址:https://www.cnblogs.com/lunhui/p/5895475.html
Copyright © 2020-2023  润新知