An error is reported when you use mysqli to connect to the database. However, you can use mysql_connect to connect to the database.

Source: Internet
Author: User
There is a virtual host on Alibaba, and I wrote a small program to run it on it. The code uses mysqli to connect to the database and reports an error. However, if I change to mysql_connect, I can connect to mysqli. the error message is: Warning: mysqli:: mysqli () :( HY0001044): Accessdeniedforuser... there is a virtual host on Alibaba. I wrote a small program and wanted to run it on it. in the code, I used mysqli to connect to the database and reported an error, but changed it to mysql_connect to connect.
Mysqli connection error message:
Warning: 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. in the code, I used mysqli to connect to the database and reported an error, but changed it to mysql_connect to connect.
Mysqli connection error message:
Warning: mysqli (): (HY000/1044): Access denied for user 'qdm177116231 '@' % 'to database 'data' in D: Xampphtdocstest. php on line 475

At least post the code. it should be because you entered the error or you have insufficient permissions.

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

The database user qdm177116231 has insufficient permissions. you can use navicat to make it easier.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.