作者:竹叶清2012 | 来源:互联网 | 2020-08-07 15:21
本篇文章给大家带来的内容是关于mysql数据库密码修改的详细步骤介绍,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。
最近在看数据库相关的东西,重装电脑以后之前的配置都没了,为了方便直接配置XAMPP一键安装包,但是在配置过程中遇见了如下几个小问题。虽然问题不大,但是还是想记录下来,以免以后遇见相同的问题不知道怎么处理。
1. Apache shutdown unexpectedly启动错误
xampp启动时显示的错误为:
9:52:41 [Apache] Attempting to start Apache app...
9:52:41 [Apache] Status change detected: running
9:52:42 [Apache] Status change detected: stopped
9:52:42 [Apache] Error: Apache shutdown unexpectedly.
9:52:42 [Apache] This may be due to a blocked port, missing dependencies,
9:52:42 [Apache] improper privileges, a crash, or a shutdown by another method.
9:52:42 [Apache] Check the "/xampp/apache/logs/error.log" file
9:52:42 [Apache] and the Windows Event Viewer for more clues
这是比较常见的80、443端口被占用的问题,处理办法如下:
(1)443端口被占用:
在/xampp/apache/conf/extra/httpd-ssl.conf配置文件中将listen 443改为444(此端口可以自己定义)
(2)80端口被占用,apache无法监听80端口
在/xampp/apache/conf/extra/httpd.conf 把Listen 80 修改为 88 (可自定义);如果配置了vhosts的话请把httpd-vhosts.conf 中端口改为88(同上端口号)
链接描述
2. phpmyadmin访问拒绝
phpmyadmin访问拒绝时错误显示为:
phpMyAdmin 尝试连接到 MySQL 服务器,但服务器拒绝连接。您应该检查配置文件中的主机、用户名和密码,并确认这些信息与 MySQL 服务器管理员所给出的信息一致。
错误产生的原因:
修改了mysql.user中root的密码,导致与phpMyAdmin配置文件中的密码不一致,所以无法连接。
解决办法:
修改../phpMyAdmin/config.inc.php中$$cfg['Servers'][$i]['password']='yourpassword'; //上面为root设置的密码
3. mysql修改初始密码
(1)win+R输入cmd进入cmd命令提示符,输入mysql -uroot -p
至此就完成了对mysql数据库的修改,以上就是配置mysql时遇到的几个小问题,在此记录一下。
以上就是mysql数据库密码修改的详细步骤介绍的详细内容,更多请关注 第一PHP社区 其它相关文章!