When using mysqli to connect to the database, an error is reported, but the connection can be made by replacing it with mysql_connect.

WBOY
Release: 2016-10-10 11:55:58
Original
1091 people have browsed it

There is a virtual host on Alibaba. I wrote a small program and wanted to run it on it. The code uses mysqli to connect to the database and reports an error, but it can be connected by using mysql_connect.
Mysqli connection error message:
Warning: mysqli::mysqli(): (HY000/1044): Access denied for user 'qdm177116231'@'%' to database 'data' in D:Xampphtdocstest.php on line 475

Reply content:

There is a virtual host on Alibaba. I wrote a small program and wanted to run it on it. The code uses mysqli to connect to the database and reports an error, but it can be connected by using mysql_connect.
Mysqli connection error message:
Warning: mysqli::mysqli(): (HY000/1044): Access denied for user 'qdm177116231'@'%' to database 'data' in D:Xampphtdocstest.php on line 475

At least post the code. It may be that you filled it in wrong or you don’t have enough permissions

qdm177116231'@'%
Check the user table to see if the user has permission to access the host~~~

The database user qdm177116231 has insufficient permissions. You can use navicat to update the user and it should be fine

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
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!