Importing and exporting a mysql database using the console, I think, is the most versatile and most convenient way, compared to the same phpmyadmin, which you need to install and configure. And work with the console takes a minimum of time.
Of course, you must have access to SSH, either directly to the console, if this is your local computer, or to VNC.
Import
First you need to create a database .
# mysql -u username -p database_name <db.sql
Export
# mysqldump -u username -p database_name > db.sql
Replace the values "username" and "database_name" with the user name and database name, respectively.
To export several databases, you can use the following command:
# mysqldump -uroot -p -B base_1 base_2 base_3 > db.sql
Where “base_1”, “base_2”, “base_3” are the names of the databases needed for copying, and “-B” is an indication that several databases are being copied.
Also, the mysqldump utility allows you to export all databases on the server into a single sql file. This is done by the command:
# mysqldump -uroot -p -A> alldb.sql
where are they stored?
To * .sql file
In which folder? :?:
In the one you specify.
> db.sql saves to the current directory, where the command came from
> /backup/mysql/db.sql saves to the dump folder, backup folders, for example
Even if you need to specify a host, you must add -h hostname
you can add it between -u and -p
There is in my opinion a mistake.
Where exporting multiple DB pointer costs.
I think it is worth fixing.
The pointer directs the output to the alldb.sql file.
Subjectively, it is better to use the following:
mysql -u User Name -p Password -h Host Name Database
in the mysql console that opens, enter:
\. OurScript.sql
then, to exit mysql, enter: \ q
Seems to be something like that)
After executing the command, an arrow appears, like this:
mysql> mysqldump -udens -p123456 base> base.sql
->
Mysqldump should be run without logging into the mysql server. Just like the usual root command in the console.
Then nothing happens (
Understood)
this version of mysql doesn’t support 'multiple triggers with the same action when importing a database
Tell me, what will the commands for creating a dump look like in the XP console? What are the differences from those given? There is no PHPmyadmin on the HAMRR server and there is no other way out
thank
How to pour 3 bases (3 tables) into the base of Muskul (Navigat)