Copy Database To Another Database Using SQLYog On Ubuntu

Copy Database To Another DB On Ubuntu

We can copy the database from host to host using SQLYog. Suppose we want to have the database from one DB server to another DB server using SQLYog. I have installed MySQL 5.7 as shown in the figure below.

SQLYog is basically used to access, perform SQL queries based on GUI and easy to use. we can perform the same task as we do use CLI mode in the server. you can use and manage your databases including all the tasks like copy, backup, import and restore the databases.

Check Out: Troubleshoot Linux Server Performance Using vmstat Command

Once you have installed and MySQL server. you have to start the service and grant the access permission to a user. So, you can use those credentials to log in to the SQLyog with GUI mode.

root@ubuntu:~# /etc/init.d/mysql start
[ ok ] Starting mysql (via systemctl): mysql.service.

Check the MySQL version using mysql

root@ubuntu:~# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.29-0ubuntu0.18.04.1 (Ubuntu)

Check Out: How To Make EBS Volume To Use On AWS Cloud

I will create a table and database using the following commands.

mysql> create database testing;
Query OK, 1 row affected (0.01 sec)

mysql> create database backup;
Query OK, 1 row affected (0.00 sec)

Now create a table in the testing database.

mysql> use testing;
Database changed
mysql> CREATE TABLE tb (name VARCHAR(20), owner VARCHAR(20),
-> species VARCHAR(20), sex CHAR(1), born DATE, birth DATE);
Query OK, 0 rows affected (0.06 sec)

mysql> show tables;
+-------------------+
| Tables_in_testing |
+-------------------+
| tb |
+-------------------+
1 row in set (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
I will start copying the database table to another DB called backup
using SQLYog tool. 

Check Out: How To Install SQLyog 15 Version On Windows Machine

Right-click on the testing database and select copy database to different
host/database.

You can select the database in the target Connection section and
database where you have to copy. Now click on copy. Testing Database
copied successfully to the backup database.

sqlyog database

Check Out: How To Install Prometheus Monitoring Tool On Linux

Now check the data in the backup database.

copy host database sqlyog

In a similar way, you can copy the database using SQLYog from host
to host. 

You’re done copy host database sqlyog

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment