I created ExpressJS MVC app using MySQL as DB with Yeoman generator
and in config.js
I want to change MySQL connection strings, but I don't know to specify password in string.
my string is mysql://root@localhost:3306/
Please help me.
I created ExpressJS MVC app using MySQL as DB with Yeoman generator
and in config.js
I want to change MySQL connection strings, but I don't know to specify password in string.
my string is mysql://root@localhost:3306/
Please help me.
Maybe you can try something like this:
Take a look at this tutorial.
If this doesn't work, you should provide us with more information.
I suggest using knex. Setting up a connection pool that manages your pool for you is trivial. See the documentation.
Here's generic connection-string parser, which offers a flexible optional syntax, while adhering to the URL syntax. Works in any environment.
Password and DB name also a part of connection string.
Ex:
mysql://root:password@localhost:port/dbName