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 ...
随机推荐
- Linux-Vim常用操作
vim wangyunpeng.txt 创建一个wangyunpeng.txt文件 输入"i"进入插入模式 显示行号,需要在命令模式下输入":se nu" cp ...
- java基础讲解05-----流程控制语句
1.条件语句 语法 : 1. if(表达式){语句块} 2. if() { }else ...
- ContentObserver与DatasetObserver区别
1. ContentObserver ContentObserver主要是通过Uri来监测特定的Databases的表,如果该Databases表有变动则会通知更新cursor中的数据. 如果 ...
- 百度语音识别demo:去掉离线识别功能
如果离线识别功能不是必须的,则为了减小包体积,可按下面方法将官方demo中的离线功能去掉: 1,删除loadOfflineEngine调用.2,删除data和license文件夹. 如此可使包体积减少 ...
- JUC组件扩展(二)-JAVA并行框架Fork/Join(三):在任务中抛出异常
在java当中,异常一共分为两种.一种是运行时异常,一种是非运行是异常. 非运行时异常:这些异常必须在方法上通过throws子句抛出.或者在方法体内进行try{…}catch{…}来捕获异常. 运行时 ...
- 如何通过 AAR 形式集成 leakcanary-android 服务
如何通过 AAR 形式集成 leakcanary-android 服务 如何通过在线引用的方式拿到所有相关的依赖项文件? #1.禁用 Gradle 离线模式 #2.按照文档要求添加项目依赖 #3.Sy ...
- [k8s]kubectl windows配置(kubernetic) && kubectl config set-context使用Kubernetic
参考: https://feisky.gitbooks.io/kubernetes/components/kubectl.html https://kubernetes.io/docs/tasks/t ...
- [svc][jk]gpu温度监测
在使用TensorFlow跑深度学习的时候,经常出现显存不足的情况,所以我们希望能够随时查看GPU时使用率.如果你是Nvidia的GPU,那么在命令行下,只需要一行命令就可以实现. 1. 显示当前GP ...
- iOS直播-基于RTMP的视频推送
iOS直播-基于RTMP的视频推送 所谓的视频推送就是把摄像头和麦克风捕获到视频和音频推送到直播服务器上.我们这里使用推送协议是RTMP协议. 扩展:腾讯直播平台,阿里直播平台,百度直播平台提供均为R ...
- H4CK1T CTF 2016 Mexico-Remote pentest writeup
进去网站之后发现连接都是包含类型的,就能想到文件包含漏洞(话说刚总结过就能遇到这题,也算是复习啦) 这里用php://filter/read=convert.base64-encode/resourc ...