在MySQL连接字符串中指定密码 [英] Specifying password in MySQL connection string
本文介绍了在MySQL连接字符串中指定密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用Yeoman生成器使用MySQL作为数据库创建了ExpressJS MVC应用程序
在config.js
中,我想更改MySQL连接字符串,但是我不知道在字符串中指定密码.
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.
我的字符串是mysql://root@localhost:3306/
请帮助我.
推荐答案
密码和数据库名称也是连接字符串的一部分.
例如:mysql://root:password@localhost:port/dbName
Password and DB name also a part of connection string.
Ex: mysql://root:password@localhost:port/dbName
这篇关于在MySQL连接字符串中指定密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文