How to Import data into Cloud Databases?

 

There area unit many ways to import information from MySQL, Percona, or MariaDB info to a MySQL database. this text describes the suggested method for commercialism information to HostingRaja Cloud Databases.

 

You can import from databases on HostingRaja's public cloud, on another cloud, or in your own information centre. If you're commercialism the information from a location while not HostingRaja ServiceNet access, appreciate another cloud or your information center, you need to either produce a cloud server to repeat your import file to or modify external access on your info by exploitation either a high accessibility (HA) instance cluster or a HostingRaja Cloud Load Balancer.

 

Linear icons about internet Free Vector

 

Create a Cloud Databases instance to receive the information

 

1. Manage the Cloud switchboard, API, or command-line customer to form a Cloud Databases situation with associate development empty info and a username and accurate identification to access it.

 

2. If you would like to vary any configuration parameters, do thus by exploitation configuration teams on the new info instance.

 

3.Proceed to at least one of the subsequent sections reckoning on however you would like to import the data:

 

Import information by employing a HostingRaja Cloud Server

Import to a info with public access (HA cluster or Cloud Load Balancer)

 

Import information by employing a HostingRaja Cloud Server

 

1. After you produce the info instance, read its details within the Cloud control board and duplicate the hostname. The hostname could be a long string of numbers and letters with HostingRaja.in at the tip. you may want the hostname in an exceedingly later step.

 

2. On the machine wherever your existing info is found, run the subsequent MySQL command to export the database:

 

mysqldump -u  -p > .sql

 

*username is that the username you utilize to access the present info.

 

*database_name is that the name of the present info.

 

*database_name.sql is that the name of the exported info file.

 

3. Use SFTP to repeat the exported .sql file to the cloud server that may access your new info.

 

4. Use ssh to log in to the server.

 

5. If you don’t have a MySQL shopper put in on your server, install one.

 

*On Ubuntu and Debian, install the shopper with the subsequent command:

 

 sudo apt-get install MySQL-client

 

*On lid and CentOS, install the shopper with the subsequent command:

 

 sudo yum install MySQL

 

*Run the subsequent MySQL import command:

 

mysql -h  -u -p < .sql

 

* Hostname is that the long public hostname for the info instance that you simply traced in step one.

 

* Username is that the username you utilize to access the info.

 

* Database_name is that the name of the new info in Cloud Databases.

 

* Database_name.sql is that the name of the exported info file.

 

The info is foreign and prepared to simply accept new information.

 

Import to a info with public access (HA cluster or Cloud Load Balancer)

 

1. After you produce the info instance, read its details within the Cloud control board and duplicate the hostname. the general public hostname for associate degree angular distance instance could be a long string of numbers and letters. you may want the hostname in an exceedingly later step.

 

2. On the machine wherever your existing info is found, run the subsequent MySQL command to export the database:

 

mysqldump -u  -p > .sql

 

* Username is that the username you utilize to access the present info.

 

* Database_name is that the name of the present info.

 

* Database_name.sql is that the name of the exported info file.

 

3. Run the subsequent MySQL import command:

 

mysql -h  -u -p < .sql

 

* Hostname is that the long public hostname for the info instance that you simply traced in step one.

 

* Username is that the username you utilize to access the info.

 

* Database_name is that the name of the new info.

 

* Database_name.sql is that the name of the exported info.

 

The info is foreign and prepared to simply accept new information.

 

Best practices

 

Large imports to new angular distance or replicated Cloud Databases instances ought to use one instance for the import and so convert to angular distance or add replicas once import. commercialism to a replicated info or angular distance cluster causes each dealing to be replicated and may refill blogs quickly and place a further load on the new instance. it's a lot of economical to import to one instance and so convert.

 

If you're commercialism between MySQL versions, appreciate from MySQL five.1 to MySQL five.6, or between completely different MySQL-based databases, appreciate from MySQL to MariaDB, review the discharge notes of the destination datastore to be told concerning attainable problems which may modify the expected behaviour of your application.

 

For associate degree example of the way to upgrade between versions of MySQL, see Upgrade a Cloud Databases instance from MySQL five.1 to MySQL five.6.

 

Limitations

 

* A full instance export (with users and settings) needs root access on each the first and new info instances. Import or export of individual databases doesn't need root access.

 

* Attempts to export or import the MySQL system info tables (for example, MySQL.user) will presumably cause problems with the practicality of your info instance and need support intervention to recover.

 

* Imports of views, triggers, procedures, or functions that have a definer, however, the info user UN agency is commercialism information can fail attributable to a demand for SUPER privilege.