Skip to content

Commit

Permalink
test: use 127.0.0.1 instead of localhost to connect local db (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Feb 13, 2023
1 parent 1c24c49 commit f7344eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/config.default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default (appInfo: EggAppConfig) => {
config.orm = {
client: 'mysql',
database: process.env.MYSQL_DATABASE || 'cnpmcore',
host: process.env.MYSQL_HOST || 'localhost',
host: process.env.MYSQL_HOST || '127.0.0.1',
port: process.env.MYSQL_PORT || 3306,
user: process.env.MYSQL_USER || 'root',
password: process.env.MYSQL_PASSWORD,
Expand Down
2 changes: 1 addition & 1 deletion test/TestUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class TestUtil {

static getMySqlConfig() {
return {
host: process.env.MYSQL_HOST || 'localhost',
host: process.env.MYSQL_HOST || '127.0.0.1',
port: process.env.MYSQL_PORT || 3306,
user: process.env.MYSQL_USER || 'root',
password: process.env.MYSQL_PASSWORD,
Expand Down

0 comments on commit f7344eb

Please sign in to comment.