简体   繁体   中英

Creating a table in a database on Cloudcontrol

On Cloudcontrol, I have added the MySQLs Add-on to my application. I can connect to the DB from my code (i am using the Yii framework). Now I want to create tables in my database, how can I achieve that? The credentials of the database are all known.

So far, I could use cctrlapp to connect to my app:

cctrlapp myapp/default run bash

Then I tried:

mysql

the server said: command not found .

From bash, I tried to SSH to MYSQLS_HOSTNAME providing MYSQLS_USERNAME , no result.

Any suggestions?

From https://www.cloudcontrol.com/dev-center/add-on-documentation/mysqls#external-access :

Download the certificate file to your local machine. Connect to the database using an SSL encrypted connection. The following example uses the MySQL command line tool.

$ mysql -u MYSQLS_USERNAME -p --host=MYSQLS_HOSTNAME --ssl-ca=PATH_TO_CERTIFICATE/mysql-ssl-ca-cert.pem

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM