1、直接调用一个案例 里面涉及到一个函数
c
o
n
n
=
m
y
s
q
l
i
c
o
n
n
e
c
t
(
′
l
o
c
a
l
h
o
s
t
′
,
′
r
o
o
t
′
,
′
12345
6
′
,
′
t
e
s
t
′
)
;
28000
/
1045
)
:
A
c
c
e
s
s
d
e
n
i
e
d
f
o
r
u
s
e
r
′
r
o
o
t
′
@
′
l
o
c
a
l
h
o
s
t
′
(
u
s
i
n
g
p
a
s
s
w
o
r
d
:
Y
E
S
)
出
现
这
个
错
误
2
、
简
单
的
分
析
了
一
下
原
因
账
号
密
码
数
据
库
数
据
库
直
接
进
入
p
h
p
M
y
a
d
m
i
n
就
可
以
查
看
账
号
密
码
到
这
里
进
行
查
看
X
:
/
w
a
m
p
/
a
p
p
s
/
p
h
p
m
y
a
d
m
i
n
.
x
.
x
.
x
/
c
o
n
f
i
g
.
i
n
c
.
p
h
p
中
查
找
conn = mysqli_connect('localhost', 'root', '123456', 'test'); 28000/1045): Access denied for user 'root'@'localhost' (using password: YES) 出现这个错误 2、简单的分析了一下原因 账号 密码 数据库 数据库直接进入phpMyadmin 就可以查看 账号 密码 到这里进行查看 X:/wamp/apps/phpmyadmin.x.x.x/config.inc.php中查找
conn=mysqliconnect(′localhost′,′root′,′123456′,′test′);28000/1045):Accessdeniedforuser′root′@′localhost′(usingpassword:YES)出现这个错误2、简单的分析了一下原因账号密码数据库数据库直接进入phpMyadmin就可以查看账号密码到这里进行查看X:/wamp/apps/phpmyadmin.x.x.x/config.inc.php中查找cfg[‘Servers’][
i
]
[
′
u
s
e
r
′
]
和
i]['user']和
i][′user′]和cfg[‘Servers’][$i][‘password’] = ‘’
密码也可以进行修改,密码没有修改执行的话 是默认为空的 直接Enter键就可以进入
update user set authentication_string=PASSWORD(‘你所要修改的密码’) where user=‘root’;
PHP连接WampServer的Mysql
最新推荐文章于 2023-12-06 17:49:28 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)