Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have a MySQL database hosted on Digital Ocean Managed Database service. I lost my previous dev machine and did not push the Schema to git along with application files. I am desperate to get back the SQL Schema in my local machine for further Development but have so far been usuccessfull. I have tried so many commands from different suggestions but they all failed.

I connect to the DB via the MySQL Shell using the command:

mysql -u username -password-h example-test-do-user-7878789-0.b.db.ondigitalocean.com -P 25060 -D example_db

All queries are executed successfully via this shell method. When trying to Dump the Schema to my machine, I use the following command:

mysql -u username -p -h mysql-test-do-user-4915853-0.db.ondigitalocean.com -P 25060 your_database_name > database_file_name.sql

But I get the error as follows: mysqldump: unknown variable 'set-gtid-purged=OFF'

if I remove that part and try again, I get the error:

mysqldump: Got error: 2003: "Can't connect to MySQL server on 'localhost' (10061 "Unknown error")" when trying to connect

which doesnt make sense to me. So, without further ranting; How to I achieve my intended result.

NOTE: I did try Mysql workbench, but it won't connect all together


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
463 views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...