1

I am using phinx for migrations in my web app.

my phinx.yml:

paths:
    migrations: %%PHINX_CONFIG_DIR%%/migrations

environments:
    default_migration_table: app_migrations
    default_database: app_database        
    development:
        adapter: mysql
        host: localhost:8888
        name: app_database
        user: ''
        pass: ''
        port:8889

I have mamp with ports apache:8888 and mysql:8889 running.

The database app_database does exist.

The table app_migrations does not exist(it will be created while migrating right?)

I already created some migrations and now i try to run them:

php vendor/bin/phinx migrate -e development

output in console:

Phinx by Rob Morgan - https://phinx.org. version 0.5.1

using config file ./phinx.yml
using config parser yaml
using migration path /path/to/directory/migrations
using environment development
using adapter mysql
using database app_database

Then it stops and nothing happens...

Anybody could help me with this issue?

Thanskj and Greetings!

Creative crypter
  • 1,348
  • 6
  • 30
  • 67

2 Answers2

0

Maybe there is some config-hickup. I know this phenomenon from conneting to a mysql-database that is not reachable via a specific host / port. This always leads to timeouts but only after eg. 60 seconds.

You wrote this in your config:

host: localhost:8888 [...] port: 8889

First remove the port from the hostname: host: localhost port: 8889 and as second verify the mysql-server is really listening on localhost / port 8889.

You'll find more on in the "Configuration"-chapter of phinx-documentation: http://docs.phinx.org/en/latest/configuration.html

Regards

0

If you're using the default settings for MAMP, the username for the database would be root. Try changing the value of user in phinx.yml to root.

ceekay
  • 151
  • 2
  • 6