![]() Then, you will be able to create the database. This will open the Shell of MySQL or MariaDB. For doing so, if you do not have a database manager, you need to connect to the database server as a “root” user. To import a MySQL or MariaDB dump, the first thing to do is to create the database where the import will take place. After the import, only the selected tables will be overwritten. ![]() In this case, it is important to be especially careful with the relationships between the different registers. ![]() Mysqldump -u username -p database_name table_name_1 table_name_2 table_name_3 > dump_filename.sql For doing so, you must indicate in the command the selection you wish to do. It is also possible to export one or several tables instead of the whole database. Host: localhost Database: database_name This command should return something like this: - MySQL dump 10.13 Distrib 8.0.28, for Linux (x86_64) For doing so, you can use the following command: head -n 5 dump_filename.sql So, to verify the SQL copy has been done correctly, you can inspect the generated file in order to make sure it is a SQL copy. That command will not generate any visual output. dump_filename.sql is the file that will be generated with all the database information.database_name must be replaced by the name of the database you want to export. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |