Why can’t I connect to mysql db with php server created with node module

I am working on a new site install with wordpress.

I am using node inside the site local;y and running a php server with a node package called Grunt-php.

Read More

In my Gruntfile.js I have:

php: {
            dist: {
                options: {
                    hostname: 'localhost',
                    open: true,
                    port: 4000,
                    base: '/Freelance/Current Projects/project/WordPress',
                }
            }
        }

This runs a php server with these packages installed in package.json file:

{
  "name": "Project-1e",
  "version": "1.0.0",
  "dependencies": {},
  "devDependencies": {
    "grunt": "~0.4.4",
    "grunt-autoprefixer": "~0.7.2",
    "grunt-contrib-cssmin": "~0.9.0",
    "grunt-contrib-imagemin": "~0.6.1",
    "grunt-contrib-jshint": "~0.10.0",
    "grunt-contrib-sass": "^0.7.3",
    "grunt-contrib-uglify": "~0.4.0",
    "grunt-contrib-watch": "~0.6.1",
    "grunt-php": "~0.3.3",
    "grunt-rsync": "~0.5.0",
    "load-grunt-tasks": "~0.4.0"
  }
}

When I use grunt and it gives me the go ahead to load the site on localhost:4000 it tells me there is not db connection when in my wp-config I have got this:

define('DB_NAME', 'project-1e');

/** MySQL database username */
define('DB_USER', 'root');

/** MySQL database password */
define('DB_PASSWORD', 'root');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

Can anyone tell me what this might be at all?

Related posts

Leave a Reply