zoukankan      html  css  js  c++  java
  • 如何修改Xampp服务器上的mysql密码(图解)

    https://www.jb51.net/article/111289.htm

    https://www.cnblogs.com/Leequik/p/5323795.html

    1、点击MySQL的admin进入phpMyAdmin页面

    或者在浏览器地址上输入http://localhost通过选择phymyadmin进入

    2、进入到数据库控制面板,然后选择名称为mysql数据库,如图,可从中看出 user表中,root的两个用户的密码为空。

    想把密码改成别的,可以直接执行下面的SQL 语句,把new_password改成自己的密码即可:

    1
    UPDATE user SET password=PASSWORD('new_password') WHERE user='root';

    3、设计好自己密码后点击执行,此时密码已经修改成功,但是问题来了,此页面已经不再是phpMyAdmin页面了,而是拒绝访问,原因是我们修改了mysql的访问密码;

    4、打开XamppphpMyAdminconfig_inc.php文件,将下面图片中的config修改为新密码,此时就完成了mysql密码修改的整个步骤,然后重新启动Xampp,点击刷新phpMyAdmin页面就可以去操作了。

    Authentication type and info */$cfg['Servers'][$i]['auth_type']
     = 'config';$cfg['Servers'][$i]['user']
     = 'root';$cfg['Servers'][$i]['password']
     = '';$cfg['Servers'][$i]['extension']
     = 'mysql';$cfg['Servers'][$i]['AllowNoPassword']
     = true;

    修改为

     Authentication type and info */$cfg['Servers'][$i]['auth_type']
     = 'config';$cfg['Servers'][$i]['user']
     = 'root';$cfg['Servers'][$i]['password']
     = '123456';$cfg['Servers'][$i]['extension']
     = 'mysql';$cfg['Servers'][$i]['AllowNoPassword']
     = true;

    假设新密码为123456

  • 相关阅读:
    leetcode--Remove Duplicates from Sorted Array
    leetcode--Valid Parentheses
    leetcode--Longest Substring Without Repeating Characters
    leetcode--Combination Sum
    leetcode--Valid Sudoku
    java 4对象群体的组织
    java 3 接口与多态&输入输出流
    java 3类的继承
    java 2类与对象[学堂在线]
    计算机网络{网页开发与服务配置}
  • 原文地址:https://www.cnblogs.com/bnuvincent/p/9253915.html
Copyright © 2011-2022 走看看