I set up a apache+mysql+php environment on the VPS, and then install Phpcms, in the fifth step of the account settings, with the creation of the user and data, the "Unable to connect to the database server, please check the configuration."
Then I installed the phpMyAdmin test can connect MySQL, with the created general account login
The results show "#1045 cannot log on to MySQL server"
"2002 cannot log in to MySQL server" with root login
I have checked the Internet and changed the php.ini Session.auto_start to 1. Restart the service, and then I tried the next time the normal user login, the display is "2002 can not log on MySQL server."
How can I configure it so that it will be connected to MySQL smoothly?
PHP version is 5.4, self-compiling integrated MySQL httpd extension.
httpd MySQL is yum installed, MySQL version is 5.0.95,httpd is 2.2.3
Version Query php-mysql-5.1.6-43.el5_10
Reply to discussion (solution)
Refer here
http://jafy00.blog.51cto.com/2594646/693649
Refer here
http://jafy00.blog.51cto.com/2594646/693649
I tried, it didn't work.
Try to connect with the root user
Now, you command the line directly to see if you can connect.
Mysql-uroot-p
Did your MySQL boot up yet?
Start your MySQL (can also be set to boot from boot)
And then as the above-mentioned command line under the link or with phpMyAdmin connection can even use your program to connect test!
First make sure your MySQL is installed correctly and see if Port 3306 is turned on.
Then determine if you can connect to MySQL through commands or tools, if you see a connection error, you can view the error log, and the path to the error log can be found in the MySQL configuration file.
Verify that your PHP is loaded on MySQL and see the phpinfo () function.
Are you sure that the "2002 cannot log on to MySQL server" error?
My morning is 2003 no response. Then I went to the bin directory under the installation directory and manually clicked on Mysql.exe.
There are 1045 errors that are user name or password error!
Resolved, which was caused by localhost. Resolve with IP Login