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
基础教程推荐
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 如何替换eregi() 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
