WinNMP – Error establishing a database connection

640

So there is automatic way of creating projects. Avoid that. Do everything by yourself since there are constant database issues. These issues are beyond repair. It is easier to reinstall the whole thing and import all your backups, than try to figure out how to solve it.
Personally, I don’t have time to ask for support. But I do have time to do things manually, which is, in most scenarios 1 minute longer than automatic way.

So, if you like WinNMP as much as I do, but you don’t want MySQL getting corrupted (Error establishing a database connection) or whatnot then follow next steps when creating new projects:

  • Reinstall WinNMP
  • create new folder in c/winnmp/www/
  • open adminer and create new database
  • copy – paste WordPress files to new folder
  • run WordPress installation
  • Done!

For permalinks to work do this:

– navigate to C:\WTServer\conf\nginx.conf. (or C:\WinNMP\conf\nginx.conf)
Add this to it after every WordPress installation:

location /nameofyourfolder {
try_files $uri $uri/ /nameofyourfolder/index.php?$args;
}

Please replace the ‘nameofyourfolder’ with your folder name where’s your WordPress installation placed. You should add this for every WordPress installation if you want it to work with Permalinks enabled.
In case you are asking yourself for the exact location on where to put this code inside “nginx.conf” file, well just put it at the end, like this for example:

Done!

For all other things, errors and configurations check my other post:

WinNMP configuration for WordPress

LEAVE A REPLY

Please enter your comment!
Please enter your name here

CAPTCHA