Connecting to mysql in xampp without password(不用密码在xampp中连接mysql)
问题描述
我想将mysql xampp密码配置为无密码.我打开了my.ini,看到下面一行:
I want to configure the mysql xampp password to no password. I opened the my.ini and I saw the following line:
# password = password
我不使用密码我应该输入什么?
I I don't use password what should I type?
这就是我尝试通过 php 连接到 mysql 时遇到的错误:
And that's the error I get when I try to connect to mysql through php:
mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using
password: YES) in C:xampphtdocsspikesfunctions.php on line 53
Failed to connect to MySQL: Access denied for user 'root'@'localhost' (using password: YES)
Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in
C:xampphtdocsspikeshome.php on line 6
推荐答案
如果你没有设置 MySQL 的密码(通过 XAMPP 打开 MySQL 配置检查),只需输入"作为密码.确保您的 PHP 脚本也配置为使用它作为密码,因为它当前正在尝试使用一个(因此使用密码:YES).
If you haven't set a password for MySQL (check by opening the MySQL config through XAMPP), just put "" as the password. Make sure your PHP script is also configured to use that as the password, because it is currently trying to use one (hence the Using password: YES).
这篇关于不用密码在xampp中连接mysql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:不用密码在xampp中连接mysql
- Laravel 仓库 2022-01-01
- PHP Count 布尔数组中真值的数量 2021-01-01
- 如何定位 php.ini 文件 (xampp) 2022-01-01
- 从 PHP 中的输入表单获取日期 2022-01-01
- 正确分离 PHP 中的逻辑/样式 2021-01-01
- 带有通配符的 Laravel 验证器 2021-01-01
- Mod使用GET变量将子域重写为PHP 2021-01-01
- 没有作曲家的 PSR4 自动加载 2022-01-01
- SoapClient 设置自定义 HTTP Header 2021-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01