Hello, I have an existing Drupal application I am trying to put into Bluemix as a POC. I was able to successfully push the Drupal files to the server and create a MySQL Service and link it. Now, I simply need to run my existing sql dump on the service. How does one do this?
Answer by Sanjay.Joshi | Mar 25, 2014 at 12:05 PM
The easiest way is to deploy something like phpMyAdmin as a separate "helper" BlueMix application using the custom PHP buildpack. You would associate the existing MySQL service (same one that's associated with your Drupal app) and then perform an import of the backup.
I've used helper admin apps like phpMyAdmin for MySQL, GenghisApp and RockMongo for MongoDB, etc ... to help admin my DB service instances to some extent.
Answer by Shao Feng Shi | Mar 27, 2014 at 09:53 AM
Hi robbush, if you have cf v5.x installed (gem install cf), you can try to use "cf tunnel", which will setup a connection to the backend service; before run it, you need have mysql client(and mysqldump) installed on your local; when cf asks which service you want to connect, select you mysql service; and then when it asks you which client you want to use, select "mysqldump"; like this:
D:\ssfhello>cf -v cf 5.4.7
D:\ssfhello>cf tunnel 1: Configuration-btd19 2: MongoLab-5lsp5 3: SQLDB-dcb56 4: SQLDB-vi 5: mongodb-b5331 6: mymongo 7: myrabbit 8: mysql-a7ddc 9: postgresql-c1398 Which service instance?> 8
1: none 2: mysql 3: mysqldump Which client would you like to start?>3
Please note, if you're using cf v6 command line, it doesn't have the tunnel function. In this case, you can just rename the cf.exe to gcf.exe, and then run "gem install cf" to install the v5.x command line; then you will be able to use both v6 and v5 cli.
Answer by Wouter Schenk | Oct 13, 2014 at 04:04 AM
Perhaps this answer is too simple, but I hope it may answer your question:
Install and use the drupal "Backup & Migrate" module to import/export your SQL database? This will give you an easy, quick GUI to import/export in SQLdump format (You can rename the file extention .myslq into .sql)
If you are using a non MySQL database, I can recommend the drupal "feeds" module.
Mysql connection from php 2 Answers
deploy PHP and MySQL app 1 Answer