A
A
andreystrelkov2016-09-13 16:06:49
MySQL
andreystrelkov, 2016-09-13 16:06:49

How to duplicate MYSQL database via command line in Windows Server 2012?

Good afternoon, please tell me how you can connect to a MySQL database located on a third-party Linux server through the command line in Windows Server and make a duplicate of the database.
More precisely, are there any exe-files, standalone packages, etc. etc.
But not the MySQL package for Windows Server (i.e. the database server installer), so anything very lightweight, to perform a few operations via CMD

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
arkitekt, 2016-09-13
@andreystrelkov

I didn't quite understand the problem. Installation is not necessary. You download the .zip package of the mysql distribution for Windows on a server. You take mysql.exe from the package, put it, say, in c: \ temp. Then you start the command line and...
c:
cd /temp
mysql -h [host.name] -P [port] -u [user.name] -p[passwd]
Next you will be prompted to enter sql commands on the server side.
> (like this)
1. The port must be specified if it is not standard (different from 3306)
2. Square brackets are not necessary :)
3. There are no spaces between -p and the password, if you leave just the -p key, then when connecting, the system will ask password of the connected user.
4. The trick will work if you know the name and password of the user who is allowed to operate '%' (from any host) and the port shines out.
You can merge the base after practicing the above method - make sure that there is a connection.
mysql -h [host] -P [port] -u [user] -p[passwd] base_name >bd.sql
The base will be in the bd.sql file in the same directory where the unpacked mysql.exe is located

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question