How can I export a MySQL database from Cloud9?

How can I export a MySQL database from Cloud9, an online development IDE in the cloud. I managed to import the database, but I still do not understand how to export it, or download it to my computer or somewhere else in this case.

+4
source share
3 answers
mysql-ctl cli
GRANT ALL PRIVILEGES ON *.* TO <username>@localhost;
SHOW VARIABLES LIKE 'socket';
quit;

mysqldump -u<username> --protocol=tcp -S /home/ubuntu/lib/mysql/socket/mysql.sock  --all-databases > db.sql

There were two tricks. Firstly, mysqldump did not allow me to run it as a regular root user, so I created my own username with full privileges. Then I looked at which outlet he ran into. Then I indicated that it should work with tcp protocol. This exported all my sql tables.

+4

,

mysqldump your_database_name > any_file_name.sql

cloud9.

+11

I was getting an error while trying to import an exported database using the above methods. I found that installing phpmyadmin works better when exporting to import into a new server database. Here is a post on how to configure it. https://community.c9.io/t/setting-up-phpmyadmin/1723

+1
source

All Articles