Reputation: 952
I am really sorry if this is not the right place to post this question. If it is not, please mark the thread and close it. A client sent me some files which needs to be edited and some functionalities added. But he didn't send me MySQL tables which is necessary in order to install it on my server. I have database credentials (like hostname, password and username). The host-name is something like: abcd1234.secureserver.net. Is it possible to get table structure using these information?
Thanks and regards, Abhisek
Upvotes: 0
Views: 130
Reputation: 319
Agree to @nikhil500.
But in some cases, the remote access of MySQL is closed for security reason. So just try telnet abcd1234.secureserver.net 3306 (change 3306 to default port if needed) see if you can success connect to this mysql without connection deny.
If you can connect it, then use
mysqldump -H abcd1234.secureserver.net --default-character-set=utf8 --opt -u$DB_USER -p$DB_PASS $DB_NAME > $YOUR_FILE
Other case, you should ask your client to execute mysqldump in his server or request an remote access setting in the server.
Upvotes: 1
Reputation: 3450
Use mysqldump
with -H
parameter to specify the hostname. Also use -d
if you want only the structure of the tables and not the data.
The above assumes that the MySQL server is listening on the public IP. If not, then you have to login to the server and run mysqldump
locally without -H
.
Upvotes: 1