0

I am trying to import a SQL file into my mysqls.free addon on cloudControl. It is not working. Documentation says:

To import an sql file into a MySQL database use the following command.

$ mysql -u MYSQLS_USER -p --host=MYSQLS_SERVER --ssl-ca=PATH_TO_CERTIFICATE/mysql-ssl-ca-cert.pem MYSQLS_DATABASE < MYSQLS_HOSTNAME.sql

I was able to connect to the SQL server, but there it says: MYSQLS_HOSTNAME not MYSQLS_SERVER and MYSQLS_USERNAME not MYSQLS_USER.

Do I need to enter different credentials?

Gracias!

vaultah
  • 44,105
  • 12
  • 114
  • 143
Timo
  • 320
  • 3
  • 14
  • When you create a new mysql installation on a server you supply a username and password (or later add username/password pairs to the database engine). when you want to connect to a running instance of a mysql server you use the mysql client (mysql) and if you have a username and password you use -u to pass the username and -p to let it know you will supply a password (these are the minimal parameters to connect). So you just need to determine what the username/password are and the name of the database to complete this line successfully. – shaunhusain Mar 16 '14 at 19:35
  • Hey thanks! But that I do know. I replace MYSQLS_USER by the Username I was provided with and when I hit enter there should be a possibility to enter the Password...at least that's what it was doing when I connected without importing. – Timo Mar 16 '14 at 19:50
  • After you connect normally can you run SHOW DATABASES; and hit enter in the mysql prompt, I believe you need to create the database before running the import if it only includes the tables. You should be able to use the same credentials for importing as you use to connect (though you can have multiple user accounts with various permissions, I'm not personally familiar with cloudcontrol). – shaunhusain Mar 16 '14 at 19:54
  • Ok! Thanks to shaunhusain I found the reason, why I wasn't able to import my database. It is necessary to CREATE DATABASE first. And MYSQLS_HOSTNAME is equal to MYSQLS_SERVER and MYSQLS_USERNAME is equal to MYSQLS_USER. That's just kind of a typo. Thanks – Timo Mar 16 '14 at 21:03

1 Answers1

0

thank you for the hint in the documentation, as you mentioned, the MYSQLS_USER and MYSQLS_SERVER placeholder were wrong. It is fixed now https://www.cloudcontrol.com/dev-center/Add-on%20Documentation/Data%20Storage/MySQLs

TooAngel
  • 873
  • 6
  • 13