Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 950 Bytes

log-in-db.md

File metadata and controls

34 lines (26 loc) · 950 Bytes
  1. SSH to the integration environment.

    magento-cloud ssh
    
  2. Find the database login information:

    php -r 'print_r(json_decode(base64_decode($_ENV["MAGENTO_CLOUD_RELATIONSHIPS"]))->database);'
    

    Sample output follows:

    Array
       (
          [0] => stdClass Object
            (
               [username] => user
               [password] =>
               [ip] => 192.0.2.60
               [host] => database.internal
               [query] => stdClass Object
                  (
                    [is_master] => 1
                  )
    
               [path] => main
               [scheme] => mysql
               [port] => 3306
            )
        )
  3. Use the following command to connect to the database:

    mysql --host=<host> --user='<database user name>' --password='<user password>' --port='<port>' --database='<path>'