PHP background is not connected to the MySQL database, view phpinfo,mysql driver normal.
View Logs
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/9D/70/wKioL1mALB-ykR1IAAAipn-2nrs045.png-wh_500x0-wm_ 3-wmp_4-s_2710672881.png "title=" Qq20170801152132.png "alt=" Wkiol1malb-ykr1iaaaipn-2nrs045.png-wh_50 "/>
The problem that the configuration is correct, the connection is rejected, and the suspect may be a user right
Accessing the database to view users and permissions
[Email protected] wezchina]# mysql-h 192.168.2.100-p 3306-usbsbl6tnulzki21-penter password:error 1045 (28000): Acces s denied for user ' user ' @ ' mycloudserver ' (using password:yes) [[email protected] wezchina]# mysql-u root-p found IP address resolved to host name and Be refused
mysql> select user,host from mysql.user;+-----------------+---------------+| user | host |+-----------------+---------------+| sbsbl6tnulzki21 | % | | root | 127.0.0.1 | | sbsbl6tnulzki21 | 192.168.2.* | | root | ::1 | | | localhost | | sbsbl6tnulzki21 | localhost | | root | localhost | | | mycloudserver | | sbsbl6tnulzki21 | mycloudserver | | root | mycloudserver |+ -----------------+---------------+10 rows in set (0.00 sec) to view the user host and find that the hostname is lowercase in/etc/ The Hosts file adds the following parsing 192.168.2.100 mycloudserver mycloudserver login Normal
This article is from the "10850395" blog, please be sure to keep this source http://10860395.blog.51cto.com/10850395/1952668
PHP connection MySQL Error troubleshooting one example