15 April,2021 by Rambler
There are some different approaches to moving tables between MariaDB database
Method 1: Move a table to another database -
This will actually move the table
alter table mig_test.testtbl rename mig_test1.testtb1;
Method 2: Entire Database
Assumed the permissions on source and target database plus underlying file permissions for the dump files are sufficient
--step 1 - dump out the data onto a local file. Ensure you have permissions on the target folder. Note use of mysqldump
mysqldump -u root databasename_source > dump.sql
--step 2 - import the data from the local file onto the target database. Note use of mysql command
mysql -u root databasename_target < dump.sql
Read more on MariaDB commands
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |