MySQL connection string using password

connectionsMySQL

I am creating app with ExpressJS and want to use MySQL with password, but I have problem with connection string

mysql://user@localhost:3306/db

in this string where to specify password to connect to db

Please help me

Best Answer

You looking for Uniform Resource Identifier (URI) scheme, and the syntax is:

mysql://username:password@host:port/database/tablename

See the MySQL documentation