mysql - myql连接本地数据库报错
PHP中文网
PHP中文网 2017-04-17 11:39:34
0
2
333

1045 Access denied for user 'root'@'localhost'(using password: YES)
这怎么解决,我看host文件里已经配置 localhost127.0.0.1了

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
巴扎黑

Can I connect from the outside? If possible, it is recommended to query the mysql.user table to see if there is support for users allowed to connect from 127.0.0.1. If not, you can use the following statement to add

GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1'
IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
Ty80

As mentioned above, if it is a remote connection, the database user needs to be granted permissions.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!