I cannot log on to the mysql server. I set up an apache + mysql + php environment on vps and install phpcms. After configuring the created user and data in step 5, "unable to connect to the database server, please check the configuration ".
Then I installed phpMyAdmin to test whether mysql can be connected and log in with the created general account.
The result shows "#1045 unable to log on to the MySQL server"
"2002 cannot log on to MySQL server" is displayed during root login"
I have checked the Internet and changed php. ini session. auto_start to 1. Restart the service, and then I tried to log on to the MySQL server this time. "2002 cannot log on to the MySQL server" is displayed ".
How can I configure it so that it can be smoothly connected to mysql?
The php version is 5.4. Compile and integrate the mysql httpd extension.
Httpd mysql is installed on yum, mysql is 5.0.95, and httpd is 2.2.3
Version query php-mysql-5.1.6-43.el5_10
Reply to discussion (solution)
Refer to here
Http://jafy00.blog.51cto.com/2594646/693649
Refer to here
Http://jafy00.blog.51cto.com/2594646/693649
I tried it. it's useless.
Try to connect with the root user
You can directly run the command on the command line to see if it can be connected.
Mysql-uroot-p
Is your mysql started?
Start your mysql instance first (you can also set it to boot automatically)
Then, you can use the command line link or phpMyAdmin connection to test the connection!
First, make sure that your mysql is correctly installed. check whether Port 3306 is enabled.
Then determine whether to connect to mysql through commands or tools. if a connection error is displayed, you can view the error log. the path of the error log can be found in the mysql configuration file.
Check whether your php is loaded with mysql. you can view the phpinfo () function.
Are you sure you have the error "2002 cannot log on to the MySQL server,
In the morning, 2003 does not respond. then I click mysql.exe in the bin directory under the installation directory.
The user name or password is incorrect!
Resolved. it is caused by localhost. Use ip address to log on