admin管理员组

文章数量:1122832

I have MySQL 8.0.12, PHP v7.3.2 64Bit and Apache 2.4.38 64Bit installed. In theory I have everything that is needed to run WordPress locally.

Through MySQL Workbench, I have tried the Host, Port, User and Password I have set up in wp-config.php and I am able to connect without any problems.

For some reason however, when I navigate to my site's wp-admin/install.php I get the following:

In my hosts file, I have dev.nativeleaf.co.uk set up to point at 127.0.0.1, along with localhost.

In my php.ini file I have uncommented extension=mysqli and extension_dir = "ext"

I also have done the steps necessary to get Apache dealing with PHP files, e.g. loading the php7_module and the AddType in httpd.conf

I also disabled all Firewalls on Windows, but still nothing! I'm so confused, I don't know why this isn't working.

Any help would be greatly appreciated.

I have MySQL 8.0.12, PHP v7.3.2 64Bit and Apache 2.4.38 64Bit installed. In theory I have everything that is needed to run WordPress locally.

Through MySQL Workbench, I have tried the Host, Port, User and Password I have set up in wp-config.php and I am able to connect without any problems.

For some reason however, when I navigate to my site's wp-admin/install.php I get the following:

In my hosts file, I have dev.nativeleaf.co.uk set up to point at 127.0.0.1, along with localhost.

In my php.ini file I have uncommented extension=mysqli and extension_dir = "ext"

I also have done the steps necessary to get Apache dealing with PHP files, e.g. loading the php7_module and the AddType in httpd.conf

I also disabled all Firewalls on Windows, but still nothing! I'm so confused, I don't know why this isn't working.

Any help would be greatly appreciated.

Share Improve this question edited Mar 2, 2019 at 15:16 J86 asked Mar 2, 2019 at 15:09 J86J86 1359 bronze badges 3
  • Are you setting the MySQL port in wp-config? Typical installs use 3306. Did you change this during the install? – czerspalace Commented Mar 2, 2019 at 21:51
  • I did yes, I am using 3307, so I have the host as localhost:3307. – J86 Commented Mar 3, 2019 at 22:04
  • and you're sure mysqli connections in PHP actually work and all the necessary stuff is setup? e.g. PHPMyAdmin or a basic test PHP script connect? Keep in mind this site is for WP development, server dev ops would be better elsewhere. What did you use to set up a local environment? Have you tried one of the existing WP oriented solutions out there that handle all of this for you? – Tom J Nowell Commented Mar 9, 2019 at 2:12
Add a comment  | 

1 Answer 1

Reset to default 0

It seems your wp is not connecting with database. There can be some reasons. 1. username, password and host from database are not correct. 2. Check mysql connection in PHP by some small php script for mysql connection.

As you told you have followed #1. Then try to check mysql connection in PHP. There should be mysql mod install in your PHP setup.

In windows try with Xampp.

本文标签: phpWindows Setup Error establishing a database connection