XAMPP修改mysql的默认密码的三种方法
How I can set a "root" password in MySQL? (method 1)
In the \xampp\mysql\bin directory enter into the console:
mysqladmin -u root password secret
Ok, "secret" should be your secret password. Then update the password for PHPMyAdmin. Open the "config.inc.php" in \xampp\phpmyadmin an edit following lines:
INSTEAD OF ...
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
NOW ...
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'secret';

Set a new 'root' passwort with mysqladmin
How I can set a "root" password in MySQL? (method 2 )
Well, there is still another possibility to set the root password. Start PHPMyAdmin with http://127.0.0.1/phpmyadmin, open the database "mysql" (never delete this!) and use the table "user". Create here a new user or e.g. simply change the password of "root." MySQL restart! After that, do not forget to change the password in the "xampp/phpmyadmin/config.inc.php" for PHPMyAdmin.
How I can set a "root" password in MySQL? (method 3 )
This method based on a suggestion by Ruedi from Basel. With that: Thanks and Grüssli to Switzerland!
Tip: Resetting the password can be make also with the /xampp/mysql/resetroot.bat. After that, the password is empty means "".
Step 1: Run cmd
C:\ program files \apachefriends\xampp\mysql\bin>mysqld-nt --skip-grant-tables
Step 2: Run cmd
C:\>C:\ program files\apachefriends\xampp\mysql\bin\mysqladmin -u root flush-privileges password "newpwd"
Step 3: Stopping MySQL
C:\>C:\ program files\apachefriends\xampp\mysql\bin\mysqladmin -u root -p shutdown
Enter password: ****** (newpwd)
Step 4: Edit the “config.inc.php” for the access of PHPMyAdmin
C:\ program files\apachefriends\xampp\phpmyadmin\config.inc.php
Here search for "root"
'$cfg['Servers'][$i]['password'] = 'newpwd'; // MySQL password
Step 5: MySQL restart
转载:http://www.apachefriends.org/zh_cn/faq-xampp-windows.html#password0
XAMPP修改mysql的默认密码的三种方法的更多相关文章
- 修改MySQL的默认密码的四种小方法
投稿:lijiao 字体:[增加 减小] 类型:转载 时间:2015-09-05我要评论 对于windows平台来说安装完MySQL后,系统就已经默认生成了许可表和账户,下文中就教给大家如何修改MyS ...
- MySQL修改密码的三种方法
MySQL修改密码的三种方法 1.方法1: 2.方法2: 3.方法3:
- 修改 VSS 默认登录用户名三种方法
修改 VSS 默认登录用户名三种方法标签: VSS VSS2005c#2014-11-27 10:27 1561人阅读 评论(0) 收藏 举报 分类: VSS软件开发总会有 BUG 和更新的需求,之前 ...
- mysql 中添加索引的三种方法
原文:http://www.andyqian.com/2016/04/06/database/mysqleindex/ 在mysql中有多种索引,有普通索引,全文索引,唯一索引,多列索引,小伙伴们可以 ...
- mysql忘记密码如何重置密码,以及修改root密码的三种方法
1.先将MySQL停止. 命令:systemctl stop mysqld #停掉MySQL 命令:systemctl status mysqld #查看状态 2.然后跳 ...
- Linux系统下修改环境变量PATH路径的三种方法
这里介绍Linux的知识,比如把/etc/apache/bin目录添加到PATH中有三种方法,看完之后你将学会Linux系统下如何修改环境变量PATH路径,需要的朋友可以参考下 电脑中必不可少的就是操 ...
- MySQL重置root密码的几种方法(windows+Linux)
重置root密码的方法: windows系统下:1.停止mysql服务:2.新建文件init-root.txt,写上如下内容: update mysql.user set password = pas ...
- mysql避免重复插入的三种方法
在开发中,我们经常遇到这样的需求,如果插入的数据不存在就插入存在就更新(或者不做任何操作).mysql的insert就提供了此功能,不需要我们在自己的业务逻辑代码上做处理.直接用mysql提供的功能来 ...
- xampp修改mysql默认密码详解
在这里介绍xampp修改mysql默认密码的大概过程是先利用xampp的phpmyadmin进入修改mysql密码,修改之后我们再修改xampp中phpmyadmin的密码,这样就完整的修改mysql ...
随机推荐
- Sphinx-实战
配置完成后, 有了数据源.索引文件存储位置等, 便可以使用 indexer 工具创建索引, 收集要被检索的数据 -c 指定配置文件 默认使用 etc/sphinx.conf --all 对所有索引重新 ...
- C语言指针的易错点
1.内存泄漏:申请的堆内存没有释放. 2.内存污染:前面非法操作使用内存(没有报错),后面写着写着就出错.如下代码: 当结构体中只有划线部分代码时,在编译器中编写不会报错,但此时已经造成非法操作内存, ...
- 基于vue实现百度离线地图
基于vue实现百度离线地图 1. 百度地图API文件获取 有网络 的情况下,需引入百度地图API文件.如下: <script type="text/javascript" s ...
- unity, Awake的调用时机
Awake是在setActive(true)时才会被调用,不过如果再setActive(false)然后重新setActive(true)的话,Awake就不会再被调用了,也就是说Awake能保证仅被 ...
- unity, 判断可见性
如果一个物体被unity判定为”退一万步讲也一定不可见“,则unity不会去渲染它,但是如果我们给此物体添加了逻辑,这个逻辑仍然会被执行. 因此,假如这个逻辑是巨耗性能的逻辑,比如说”mesh的每个顶 ...
- windows server 2008 桌面图标
1.开始-->"搜索"-->"icon"-->"显示桌面通用图标"
- atitit.Sealink2000国际海运信息管理系统
atitit.Sealink2000国际海运信息管理系统 操作手册 目录 第一章 使用说明 第一节 系统登录 双击桌面的系统执行程序图标,进入选择数据库的对话框,如图1-1所示.选择相应的数据库后,点 ...
- (2.0)Smali系列学习之Smali语法
一.smali的包中信息 .class public Lcom/aaaaa;.super Lcom/bbbbb;.source "ccccc.java" 1.它是com.aaa ...
- 3.Queues(队列)
一.概述 C++队列是一种容器适配器,它给予程序员一种先进先出(FIFO)的数据结构,与stack刚好相反. 二.常用API back() 返回最后一个元素 empty() 如果队列空则返回真 fro ...
- TCP协议的三次握手和四次挥手过程
TCP是一种面向连接(连接导向)的.可靠的基于字节流的传输层通信协议.TCP将用户数据打包成报文段,它发送后启动一个定时器,另一端收到的数据进行确认.对失序的数据重新排序.丢弃重复数据. 1.TCP/ ...