Install wordpress connection MySQL database problem

Source: Internet
Author: User
Tags install wordpress traceroute test wordpress blog

Today's newly built LNMP environment, install WordPress Blog to do testing, installation to fill in the database information, has been error database connection errors, re-create the library, re-authorized users, all prompt the same error, and later authorized to use IP address, connection success, send a blog post everyone to discuss the problem:


Creating a database create databases blog;

Authorized user grant all on blog.* to [e-mail protected] identified by ' 123456 ';

The problem lies in:

1, in the browser to fill in the WordPress information, database host for localhost, can not connect, change to 127.0.0.1 can be connected;

However, the authorized user designated host as localhost, not 127.0.0.1;127.0.0.1 is not authorized at all;

2, local use of new authorized users and passwords can log into the database;

3. Re-authorize the user, specify the host as the local IP address: Grant all on blog.* to [email protected] identified by ' 123456 ';

can also be connected normally;

4, directly in the blog directory modification wp-config-sample.php to wp-config.php and modify the database name, user name, password, installation also prompts the database connection error;


Create a library, authorized users are no problem, is the connection problem, where is the problem?????


Using the traceroute test, the use of localhost connection speed is the fastest, but also the most error-prone; the Netizen recommends using localhost as the database host;

[Email protected] ~]# traceroute localhosttraceroute to localhost (127.0.0.1), Hops max, byte packets1 localhost (1 27.0.0.1) 0.056 Ms 0.019 ms 0.016 ms[[email protected] ~]# traceroute 127.0.0.1traceroute to 127.0.0.1 (127.0.0.1), hop s Max, packets1 localhost (127.0.0.1) 0.072 ms 0.019 ms 0.017 ms[[email protected] ~]# traceroute 192.168.20.5trac Eroute to 192.168.20.5 (192.168.20.5), Hops Max, byte packets1 192.168.20.5 (192.168.20.5) 0.090 Ms 0.020 ms 0.017 m S


This article is from the "Model Student's Learning blog" blog, please be sure to keep this source http://mofansheng.blog.51cto.com/8792265/1688552

Install wordpress connection MySQL database problem

Related Article

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.