-
SSH to the integration environment.
magento-cloud ssh
-
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 ) )
-
Use the following command to connect to the database:
mysql --host=<host> --user='<database user name>' --password='<user password>' --port='<port>' --database='<path>'