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 ...
随机推荐
- 项目启动报错:No suitable driver found for jdbc:oracle:thin:@192.168.7.146:1521:oracle
No suitable driver found for jdbc:oracle:thin:@192.168.7.146:1521:oracle 这个错误的原因主要有以下几方面的原因: 1. url配 ...
- 使用Nexus创建私服
原文链接:http://www.cnblogs.com/helong/articles/2254446.html 注意:nexus2.6.0版本以后不支持jdk6了,必须jdk1.7或以上. 参考:h ...
- linux 下远程连接mysql命令详解
http://hi.baidu.com/aaxh/blog/item/49bcb78ffe3dfae4f01f36b2.html一.MySQL 连接本地数据库,用户名为“root”,密码“123”(注 ...
- 使用Openssl创建证书
概述 SSL证书通过在客户端浏览器和Web服务器之间建立一条SSL安全通道(Secure socketlayer(SSL),SSL安全协议主要用来提供对用户和服务器的认证:对传送的数据进行加密和隐藏: ...
- HTTP协议—— 简单认识TCP/IP协议(转载)
原文地址(http://www.cnblogs.com/roverliang/p/5176456.html) 1.什么是TCP/IP 如果要了解一个人,可以从他归属的集体聊起来.我们的HTTP协议就 ...
- SQL&EF优化第一篇 各种情况下的性能测试之count函数篇
测试环境 mssql 08 +win7 数据 30W条 二〇一六年十月二十九日 09:04:43 结论:1>主键> *>可空列 推测未论证: 根据情况优先选择 顺便提 ...
- MongoDB - Cursors
db.collection.find()查询集合会返回一个包含查到的文档的游标.在mongo shell中,如果没有定义一个变量来该游标的内容,默认会迭代返回20个文档. > db.users. ...
- Xcode中利用git源代码版本号控制
git是一个版本号控制系统,能够通过命令行来调用,也有专门的桌面软件.这里主要介绍在Xcode中怎样利用git来进行版本号的控制. 一.创建git源 从Xcode5開始引入了使用git的一些新特性.将 ...
- hdu1243 最长公共子序列(LCS)
原题地址 题目分析 这道题基本上是在普通LCS问题上的一点小小的变形,由求LCS的长度,改为求LCS的权值.架构还是不变的.可作为LCS问题的模板题.时间复杂度O(N^2). 注意 题目中的字母都是小 ...
- Atitit.词法分析的理论原理 part2
Atitit.词法分析的理论原理 part2 1. 转换图1 1.1. 转换图是由程序流程图改进而成的.同样,转换图也可以等价地转换为程序流程图3 1.2. 2.2.3 构造词法分析器(2)流程程 ...