sql-migrate icon indicating copy to clipboard operation
sql-migrate copied to clipboard

Error 1046: No database selected

Open muchuang1024 opened this issue 7 years ago • 3 comments
trafficstars

development:
    dialect: mysql
    datasource: root@/test?parseTime=true
    dir: migrations/mysql
    table: migrations

this is my dbconfig.yml, but it show 'No database selected' when I run command 'sql-migrate status

muchuang1024 avatar Jul 03 '18 08:07 muchuang1024

@rubenv can you see it ? my mysql password is empty

muchuang1024 avatar Jul 04 '18 04:07 muchuang1024

I'm sorry, but I don't use MySQL. We have integration tests for MySQL so all I can say is that it should work.

Perhaps there's something wrong with your database? Can't really help out here.

rubenv avatar Jul 04 '18 06:07 rubenv

  1. the datasource must declare dbname? It can't support "one sql for db1, another sql for db2"
  2. when sql declare "use db1", but datasource declare 'db2',It will become conflict

muchuang1024 avatar Jul 04 '18 07:07 muchuang1024