mysqldump: Got error: 2002: "Can't connect to MySQL server on 'x' (code)" when trying to connect
1
vote
1
answer
7473
views
I am trying to create a back up from a server by using XAMPP (via command prompt).
Unfortunately the error is:
mysqldump: Got error: 2002: "Can't connect to MySQL server on 'x' (10060)" when trying to connect
. I have looked a bit around on StackOverflow (mostly0, but most questions are regarding "access denied for user at (...)" or they're talking about MYSQL. I have tried finding the files that MYSQL should have (which they're discussing) and looked whether XAMPP had these as well (it did not).
***My question is:***
What could possibly be causing this error? I know the name, password and host are correct.
***How have I tried backing up the database?***
I opened Command Prompt with administrator rights.
I navigated to the correct directory where mysqldump
is located at.
I then typed in: C:\xampp\mysql\bin>mysqldump -e -uNAME -pPWD -hHOST DATABASENAME > C:\winhostMySqlD.sql
It *does* create the .sql
file, but CMD crashes with the error mentioned above.
Asked by I try so hard but I cry harder
(111 rep)
Mar 10, 2021, 02:01 AM
Last activity: Jul 5, 2022, 07:01 AM
Last activity: Jul 5, 2022, 07:01 AM