{"id":46565,"date":"2018-03-07T00:00:00","date_gmt":"2018-03-07T08:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/blog\/migrating-from-mysql-to-griddb\/"},"modified":"2025-11-13T12:54:43","modified_gmt":"2025-11-13T20:54:43","slug":"migrating-from-mysql-to-griddb","status":"publish","type":"post","link":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/migrating-from-mysql-to-griddb\/","title":{"rendered":"Migrating from MySQL to GridDB"},"content":{"rendered":"<h2 id=\"intro\">Introduction<\/h2>\n<p>Common concerns developers might have when doing a database migration including having to remodel the existing database to fit with a NoSQL model. Another concern is having to figure a way to fetch and rearrange the relational data into the new database. Luckily in this post we will show a brief example of how to perform a migration of MySQL database to a new NoSQL GridDB database.<\/p>\n<h3 id=\"example\">Industry Example<\/h3>\n<p>All of the data for our migration will relate to the maintenance of a Photovoltaic site, <b>PV site<\/b> . A PV site is an industrial site equipped with hundreds to thousands of solar panels that collect power and transmit it to a power grid. A PV site can also be known as a <b>solar farm<\/b>. There could be up to thousands of internet-capable sensors involved in this process. Data reports from these sensors could include measurements such as voltage readings and alerts. An industrial site like this could scale to many different sizes and involve various types of devices. <\/p>\n<p>Depending on the scenario, fast performance and reliability might be needed as well. This makes GridDB with its high performance, scalability, and flexibility the best database to migrate to for this PV site.<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/03\/pv_site_resize.png\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/03\/pv_site_resize.png\" alt=\"\" width=\"688\" height=\"780\" class=\"aligncenter size-full wp-image-25771\" srcset=\"\/wp-content\/uploads\/2019\/03\/pv_site_resize.png 688w, \/wp-content\/uploads\/2019\/03\/pv_site_resize-265x300.png 265w, \/wp-content\/uploads\/2019\/03\/pv_site_resize-600x680.png 600w\" sizes=\"(max-width: 688px) 100vw, 688px\" \/><\/a><\/p>\n<h3 id=\"sql-schema\">Initial MySQL Database<\/h3>\n<p>The MySQL database for this site will have <b>4 Tables<\/b>. These 4 tables will translate into <b>4 container schemas<\/b> in GridDB. These schemas will be implemented as <b>4 Java classes<\/b> since we will be performing the migration in Java.<\/p>\n<p>The tables and their GridDB schemas are listed below:<\/p>\n<style>\n    table, th, td {\n       border: 1px solid black;\n    }\n<\/style>\n<ol>\n<li><b>Facilities:<\/b> Contains information and specifications for the facilities of the PV site.<\/li>\n<p><\/p>\n<div style=display: block;\">\n<div style=\"width: 50%; float: left;\">\n<div style=\"text-align: center;width: 90%\"><b>MySQL Facilities Table<\/b><\/div>\n<p><\/p>\n<pre class=\"prettyprint\" style=\"width: 90%;\">\nCREATE TABLE IF NOT EXISTS facilities (\n   facilityId VARCHAR(40) NOT NULL,\n   name VARCHAR(60) NOT NULL,\n   specifications BLOB,\n   PRIMARY KEY (facilityId)\n);        \n           <\/pre>\n<\/p><\/div>\n<div style=\"width: 50%; float: left;\">\n<div style=\"width: 90%; text-align: center;\"><b>GridDB Facility Container Schema<\/b><\/div>\n<p><\/p>\n<pre class=\"prettyprint\" style=\"width: 90%;\">\npublic class Facility{\n    @RowKey\n    public String facilityId;\n    public String name;\n    public Blob specifications;\n}\n           <\/pre>\n<\/p><\/div>\n<div style=\"clear: both;\">&nbsp;<\/div>\n<\/p><\/div>\n<li><b>Sensor:<\/b> Stores general information like <i>sensor-type<\/i> and name on the PV site&#8217;s sensors<\/li>\n<p><\/p>\n<div style=\"display: block;\">\n<div style=\"width: 50%;float: left;\">\n<div style=\"text-align:center; width: 90%;\"><b>MySQL Sensor Table<\/b><\/div>\n<p><\/p>\n<pre class=\"prettyprint\" style=\"width: 90%;\">\nCREATE TABLE IF NOT EXISTS sensors (\n   sensorId VARCHAR(40) NOT NULL PRIMARY KEY (sensorId),\n   facilityId VARCHAR(40) NOT NULL,\n   name VARCHAR(60) NOT NULL,\n   type VARCHAR(30) NOT NULL,\n   FOREIGN KEY (facilityId) REFERENCES facilities(facilityId) \n     ON DELETE CASCADE ON UPDATE CASCADE\n);\n          <\/pre>\n<\/p><\/div>\n<div style=\"width: 50%; float:left;\">\n<div style=\"text-align: center;width: 90%;\"><b>GridDB Sensor Container Schema<\/b><\/div>\n<p><\/p>\n<pre class=\"prettyprint\" style=\"width: 90%;\">\n\/\/Row schema class similar to the 'Sensors' table\npublic class Sensor {\n    @RowKey\n    public String sensorId;\n\n    public String name;\n    public String type;\n}\n           <\/pre>\n<\/p><\/div>\n<div style=\"clear: both;\">&nbsp;<\/div>\n<\/p><\/div>\n<li><b>Readings:<\/b> Stores the timestamps and values of the measurements recorded by the PV site&#8217;s sensors<\/li>\n<p><\/p>\n<div style=\"display: block;\">\n<div style=\"width: 50%;float: left;\">\n<div style=\"text-align: center; width: 90%;\"><b>MySQL Reading Table<\/b><\/div>\n<p><\/p>\n<pre class=\"prettyprint\" style=\"width: 90%;\">\nCREATE TABLE IF NOT EXISTS readings (\n   record_id INT AUTO_INCREMENT PRIMARY KEY(record_id),\n   sensorId VARCHAR(40) NOT NULL,\n   tstamp TIMESTAMP NOT NULL,\n   value DECIMAL(19,4) NOT NULL,\n   status VARCHAR(255) NOT NULL,\n   FOREIGN KEY (sensorId) REFERENCES sensors(sensorId) \n     ON DELETE CASCADE ON UPDATE CASCADE\n);\n            <\/pre>\n<\/p><\/div>\n<div style=\"width: 50%;float: left;\">\n<div style=\"text-align: center;width: 90%;\"><b>GridDB Reading Container Schema<\/b><\/div>\n<p><\/p>\n<pre class=\"prettyprint\" style=\"width: 90%;\">\n\n\/\/Row schema class similar to the 'Readings' table\npublic class Reading {\n    @RowKey\n    public Date tstamp;\n\n    public double value;\n\n    public String status;\n}\n            <\/pre>\n<\/p><\/div>\n<div style=\"clear: both;\">&nbsp;<\/div>\n<\/p><\/div>\n<li><b>Alerts:<\/b> Stores information related to alerts and notification sent by the sensors<\/li>\n<p><\/p>\n<div style=\"display: block;\">\n<div style=\"width: 50%;float: left;\">\n<div style=\"text-align: center;width: 90%;\"><b>MySQL Alerts Table<\/b><\/div>\n<p><\/p>\n<pre class=\"prettyprint\" style=\"width: 90%;\">\nCREATE TABLE IF NOT EXISTS alerts (\n  id INT AUTO_INCREMENT PRIMARY KEY (id),\n  tstamp TIMESTAMP NOT NULL,\n  facilityId VARCHAR(40) NOT NULL,\n  sensorId VARCHAR(40) NOT NULL,\n  level INT NOT NULL,\n  detail VARCHAR(255) NOT NULL,\n  FOREIGN KEY (facilityId) REFERENCES facilities(facilityId) \n     ON DELETE CASCADE ON UPDATE CASCADE,\n  FOREIGN KEY (sensorId) REFERENCES sensors(sensorId) \n     ON DELETE CASCADE ON UPDATE CASCADE\n);\n            <\/pre>\n<\/p><\/div>\n<div style=\"width: 50%;float: left;\">\n<div style=\"text-align: center;width: 90%;\"><b>GridDB Alerts Container Schema<\/b><\/div>\n<p><\/p>\n<pre class=\"prettyprint\" style=\"width: 90%;\">\n\/\/Row schema class similar to 'alerts' table\npublic class Alert {\n    @RowKey\n    public int alertId;\n    \n    public String facilityId;\n    public String sensorId;\n  \n    public Date tstamp;\n    public int level;\n    public String detail;\n}\n            <\/pre>\n<\/p><\/div>\n<div style=\"clear: both;\">&nbsp;<\/div>\n<\/p><\/div>\n<\/ol>\n<h4 id=\"translation\">Translating Tables to Containers<\/h4>\n<p>When translating relational data tables into the <i>key-container<\/i> model of GridDB, it is important to which tables should have a one-to-many-relation. This can involve splitting a table into many containers. Mapping one table to many containers is a way of improving scalability, especially for timeseries data. To elaborate, one container might have many rows. Each row key in each row will also be the name of other containers in GridDB. This allows for containers to relate to each other in a scalable way. <\/p>\n<p>To elaborate, a row in the <code>facilities<\/code> table corresponds to an individual facility in the PV site. Each facility holds many different sensors. <\/p>\n<p>Now that we have our data model and schemas for GridDB created, we can now do the actual data migration. The approach we will use is to select all the rows from each table in MySQL and create a new row in GridDB and insert it into a GridDB container. We will use the <code>JDBC<\/code> driver to access the MySQL data and the <a href=\"https:\/\/github.com\/griddb\/griddb_nosql\" title=\"GridDB Java API Source Code\">GridDB Java API<\/a> to connect to GridDB. All the data for the PV site is held in a database named <code>pv<\/code> in MySQL.<\/p>\n<p><b>Connect to GridDB and MySQL in Java<\/b><\/p>\n<pre class=\"prettyprint\">\n\/\/ Connect to 'pv' database in MySQL\nClass.forName(\"com.mysql.jdbc.Driver\");\nConnection connection =  \n DriverManager.getConnection(\"jdbc:mysql:\/\/localhost\/pv?user=root&password=PASSWORD\");\n\/\/(snip)\n\n\/\/Connect to GridDB Cluster\nProperties properties = new Properties();\nproperties.setProperty(\"notificationAddress\",\"239.0.0.1\");\nproperties.setProperty(\"notificationPort\",\"31999\");\nproperties.setProperty(\"clusterName\",\"defaultCluster\");\nproperties.setProperty(\"user\",\"admin\");\nproperties.setProperty(\"password\",\"admin\");\n\ngridstore = GridStoreFactory.getInstance().getGridStore(properties);\n<\/pre>\n<p>The first table to migrate from MySQL will be the <code>facilites<\/code> table. We will migrate the facilities table to a <code>Collection<\/code> container of the same name. It will have a similar schema to the MySQL table. As a way to improve scalability, we will create a <code>Collection<\/code> (named with the facility&#8217;s <i>facility id<\/i>) with a schema similar to <code>sensors<\/code> table from MySQL. Each <i>facility<\/i> container will be responsible storing the sensors for that facility.<\/p>\n<pre class=\"prettyprint\">\nCollection&lt;String,Facility&gt; collection = gridstore.putCollection(\"facilities\",Facility.class);\n<\/pre>\n<p>To translate a row from MySQL to GridDB, simply fetch each row field from MySQL and map it to the corresponding column in GridDB. Translating <i>Blob<\/i> types in Java are not so intuitive but an example is provided below on how to translate a Blob data from MySQL to GridDB.<\/p>\n<pre class=\"prettyprint\">\nStatement statement = connection.createStatement();\n\/\/Obtain all rows from the 'facilities' table in MySQL\nResultSet resultSet = statement.executeQuery(\"SELECT * FROM pv.facilities\");\n\n\/\/For every row in the 'facilities' table\nwhile(resultSet.next()){\n   \/\/Create a GridDB row for each MySQL row\n   Facility facility = new Facility();\n   \/\/Set facilityId column in GridDB to facilityId in MySQL column\n   facility.facilityId = resultSet.getString(\"facilityId\"); \n\n   \/\/First search if there is an existing Collection of that has the facilityId as its name.\n   \/\/If it doesn't exist, create it\n   Collection&lt;String,Sensor&gt; sensorCollection =  \n    gridstore.getCollection(facility.facilityId,Sensor.class);\n  \n   if(sensorCollection == null){\t\t\t\t\t\t\n     gridstore.putCollection(facility.facilityId,Sensor.class);\n   }\n\n   \/\/Set 'name' column in GridDB row to 'name' in MySQL row\n   facility.name = resultSet.getString(\"name\");\n\n   InputStream stream = null;\n   \/\/Stream to Create GridDB Blob Object\n   ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n   try {\n     \/\/Get Blob column of MySQL row as a Binary stream\n     stream = new BufferedInputStream(resultSet.getBinaryStream(\"specifications\"));\n     \/\/Take binary stream and use it as an InputStream\n\t\t\t\t\t\t\n     byte buffer[] = new byte[1024];\n     while(stream.read(buffer) != -1){\n       \/\/Write blob data from MySQL to buffer stream for GridDB\n       byteStream.write(buffer);\n       }\n    } finally {\n      if(stream != null){\n        stream.close();\n      }\n    }\n\n    \/\/Create GridDB Blob value from Inputstream\n    facility.specifications = new SerialBlob(byteStream.toByteArray());\n\n    \/\/Insert new row into GridDB container for facilites\n    collection.put(facility.facilityId,facility);\n<\/pre>\n<p>The second table to migrate is the <code>sensors<\/code> from MySQL. Each row in this table has a <code>FOREIGN KEY<\/code> column, <code>facilityId<\/code>. This column details which facility a sensor belongs to. When we migrate this row into GridDB, we will get that column value from the row and retrieve the <code>Collection<\/code> container that corresponds to that facility. We then create a new <code>Sensor<\/code> row from the rest of the column values in the MySQL row and insert it into the container. Just like the one-to-many mapping for facilities, we will create a similar mapping with sensors. Each sensor will get its own <code>TimeSeries<\/code> container for storing the sensor&#8217;s measurements. (Its <i>sensor id<\/i> will be the Timeseries&#8217;s name).<\/p>\n<pre class=\"prettyprint\">\n\/\/Get all rows from the 'sensors' table in MySQL\nResultSet resultSet = statement.executeQuery(\"SELECT * FROM pv.sensors\");\n\n\/\/For every in 'sensors' table\nwhile(resultSet.next()){\n   \/\/Create a new row for Sensor storing container\n   Sensor sensor = new Sensor();\n\n   \/\/Get facilityId to find the corresponding Collection container in GridDB\n   String facilityId = resultSet.getString(\"facilityId\");\n\t\t\t\t\n   \/\/Map sensorId, name, and type columns to the corresponding columns in the GridDB container\t\n   sensor.sensorId = resultSet.getString(\"sensorId\");\n   sensor.name = resultSet.getString(\"name\");\n   sensor.type = resultSet.getString(\"type\");\n\n   \/\/Find the Collection container of the facility that the sensor belongs to\n   Collection&lt;String,Sensor&gt; collection = gridstore.getCollection(facilityId,Sensor.class);\n\n   \/\/Insert 'sensor' row into Collection container\n   collection.put(sensor.sensorId,sensor);\n\n   \/\/Check if there is an existing Timeseries container\n   \/\/that is responsible for storing that sensor's measurements\n   TimeSeries&lt;Reading&gt; timeseries = gridstore.getTimeSeries(sensor.sensorId,Reading.class);\n\n   \/\/If the container doesn't exist create it and insert it into GridDB\n   if(timeseries == null){\n      gridstore.putTimeSeries(sensor.sensorId,Reading.class);\n   }\n}\n<\/pre>\n<p>The third table we migrate is the <code>readings<\/code> table. Just like all the other tables we fetch all the other column values for our new row in GridDB from the column fields of the row in MySQL. We will use the <code>sensorId<\/code> column value from the MySQL row to determine which <code>Timeseries<\/code> container the new GridDB row will be inserted into. Note, in GridDB, <i>Timestamp<\/i> columns are represented from <code>java.util.Date<\/code> while in MySQL JDBC it is <code>java.sql.Timestamp<\/code>, convert the value accordingly. <\/p>\n<pre class=\"prettyprint\">\n\/\/Function for translating a MySQL timestamp to GridDB Timestamp\nDate parseTimestamp(Timestamp timestamp){\n   Date date = new Date(timestamp.getTime());\n   return date;\n}\n\n\/\/(snip)\n\n\/\/Get and iterate through all measurements in the 'readings' table\nResultSet resultSet = statement.executeQuery(\"SELECT * FROM pv.readings ORDER BY tstamp\");\n\n\nwhile(resultSet.next()){\n   \/\/Find out which sensor the measurement belongs to\n   String sensorId = resultSet.getString(\"sensorId\");\n\n   \/\/Obtain the Timeseries container that corresponds to that sensor\n   TimeSeries&lt;Reading&gt; timeseries = gridstore.getTimeSeries(sensorId,Reading.class);\n\n   \/\/Obtain and parse the MySQL row's timestamp column\n   Timestamp timestamp = resultSet.getTimestamp(\"tstamp\");\n   Date rowKey = parseTimestamp(timestamp);\n\n   \/\/Create a new GridDB row and map all the columns accordingly\n   Reading reading = new Reading();\n   reading.tstamp = rowKey; \/\/Set row timestamp to parse timestamp from MySQL TIMESTAMP column\n   reading.value = resultSet.getDouble(\"value\"); \/\/Parse double value from MySQL DECIMAL column\n   reading.status = resultSet.getString(\"status\");\n\n   \/\/Insert timestamp row into Timeseries\n   timeseries.put(reading.tstamp,reading);\n}\n<\/pre>\n<p>The last table we will migrate is the <code>alerts<\/code>. This migration is rather simple and fairly akin to the migration for the <code>facilities<\/code> table.<\/p>\n<pre class=\"prettyprint\">\n\/\/Obtain and iterate through all the rows in the 'alerts' MySQL table\nResultSet resultSet = statement.executeQuery(\"SELECT * FROM pv.alerts\");\n\nCollection&lt;Integer,Alert&gt; collection = gridstore.putCollection(containerName,Alert.class);\n\nwhile(resultSet.next()){\n   \/\/Create a new GridDB row for 'alerts' container\n   Alert alert = new Alert();\n\n   Timestamp timestamp = resultSet.getTimestamp(\"tstamp\");\/\/Obtain timestamp from TIMESTAMP column\n\n   alert.alertId = resultSet.getInt(\"id\"); \/\/Parse integer id from INTEGER COLUMN of row\n   alert.facilityId = resultSet.getString(\"facilityId\"); \n   alert.sensorId = resultSet.getString(\"sensorId\");\n\n   \/\/Translate SQL Timestamp to GridDB Timestamp format\n   alert.tstamp = parseTimestamp(timestamp);\n\n   alert.level = resultSet.getInt(\"level\"); \/\/Parse integer id from INTEGER COLUMN of row\n   alert.detail = resultSet.getString(\"detail\");\n\n   \/\/Insert new row into 'alerts' Collection\n   collection.put(alert.alertId,alert);\n}\n<\/pre>\n<p>Our migration is now complete, all data from our MySQL database is now in GridDB. Now you can drop your old MySQL database and continue with a new faster, more scalable GridDB database.<\/p>\n<p>MySQL is a relational database used heavily in business intelligence, web development, and marketplace and inventory management. For the purpose of this tutorial we set up an initial relational database using MySQL <b>Version 5.7<\/b> on <b>CentOS 7<\/b>. We used <a href=\"https:\/\/github.com\/griddb\/griddb_nosql\/releases\/download\/v3.0.1\/griddb_nosql-3.0.1-1.linux.x86_64.rpm\" title=\"Download GridDB CE\">GridDB Community Edition Build 3.0.1<\/a> as our GridDB database.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Common concerns developers might have when doing a database migration including having to remodel the existing database to fit with a NoSQL model. Another concern is having to figure a way to fetch and rearrange the relational data into the new database. Luckily in this post we will show a brief example of how [&hellip;]<\/p>\n","protected":false},"author":123,"featured_media":22066,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[121],"tags":[],"class_list":["post-46565","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Migrating from MySQL to GridDB | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"Introduction Common concerns developers might have when doing a database migration including having to remodel the existing database to fit with a NoSQL\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Migrating from MySQL to GridDB | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"Introduction Common concerns developers might have when doing a database migration including having to remodel the existing database to fit with a NoSQL\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/\" \/>\n<meta property=\"og:site_name\" content=\"GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/griddbcommunity\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-03-07T08:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-13T20:54:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/wp-content\/uploads\/2018\/02\/blog_title_22.png\" \/>\n\t<meta property=\"og:image:width\" content=\"870\" \/>\n\t<meta property=\"og:image:height\" content=\"490\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Joshua Pascascio\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:site\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Joshua Pascascio\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/\"},\"author\":{\"name\":\"Joshua Pascascio\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/ca72185e9a3778df765a76313f789fd8\"},\"headline\":\"Migrating from MySQL to GridDB\",\"datePublished\":\"2018-03-07T08:00:00+00:00\",\"dateModified\":\"2025-11-13T20:54:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/\"},\"wordCount\":265,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2018\/02\/blog_title_22.png\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/\",\"url\":\"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/\",\"name\":\"Migrating from MySQL to GridDB | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2018\/02\/blog_title_22.png\",\"datePublished\":\"2018-03-07T08:00:00+00:00\",\"dateModified\":\"2025-11-13T20:54:43+00:00\",\"description\":\"Introduction Common concerns developers might have when doing a database migration including having to remodel the existing database to fit with a NoSQL\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2018\/02\/blog_title_22.png\",\"contentUrl\":\"\/wp-content\/uploads\/2018\/02\/blog_title_22.png\",\"width\":870,\"height\":490},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb.net\/en\/#website\",\"url\":\"https:\/\/griddb.net\/en\/\",\"name\":\"GridDB: Open Source Time Series Database for IoT\",\"description\":\"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL\",\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"contentUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"width\":200,\"height\":83,\"caption\":\"Fixstars\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/griddbcommunity\/\",\"https:\/\/x.com\/GridDBCommunity\",\"https:\/\/www.linkedin.com\/company\/griddb-by-toshiba\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/ca72185e9a3778df765a76313f789fd8\",\"name\":\"Joshua Pascascio\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/872ef8be79cb5117c256feb4c279ac41b954bfba599d647db925185c449aff1c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/872ef8be79cb5117c256feb4c279ac41b954bfba599d647db925185c449aff1c?s=96&d=mm&r=g\",\"caption\":\"Joshua Pascascio\"},\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/author\/joshua\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Migrating from MySQL to GridDB | GridDB: Open Source Time Series Database for IoT","description":"Introduction Common concerns developers might have when doing a database migration including having to remodel the existing database to fit with a NoSQL","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/","og_locale":"en_US","og_type":"article","og_title":"Migrating from MySQL to GridDB | GridDB: Open Source Time Series Database for IoT","og_description":"Introduction Common concerns developers might have when doing a database migration including having to remodel the existing database to fit with a NoSQL","og_url":"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2018-03-07T08:00:00+00:00","article_modified_time":"2025-11-13T20:54:43+00:00","og_image":[{"width":870,"height":490,"url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/wp-content\/uploads\/2018\/02\/blog_title_22.png","type":"image\/png"}],"author":"Joshua Pascascio","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"Written by":"Joshua Pascascio","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/#article","isPartOf":{"@id":"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/"},"author":{"name":"Joshua Pascascio","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/ca72185e9a3778df765a76313f789fd8"},"headline":"Migrating from MySQL to GridDB","datePublished":"2018-03-07T08:00:00+00:00","dateModified":"2025-11-13T20:54:43+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/"},"wordCount":265,"commentCount":0,"publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2018\/02\/blog_title_22.png","articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/","url":"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/","name":"Migrating from MySQL to GridDB | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/#primaryimage"},"image":{"@id":"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2018\/02\/blog_title_22.png","datePublished":"2018-03-07T08:00:00+00:00","dateModified":"2025-11-13T20:54:43+00:00","description":"Introduction Common concerns developers might have when doing a database migration including having to remodel the existing database to fit with a NoSQL","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/#primaryimage","url":"\/wp-content\/uploads\/2018\/02\/blog_title_22.png","contentUrl":"\/wp-content\/uploads\/2018\/02\/blog_title_22.png","width":870,"height":490},{"@type":"WebSite","@id":"https:\/\/griddb.net\/en\/#website","url":"https:\/\/griddb.net\/en\/","name":"GridDB: Open Source Time Series Database for IoT","description":"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL","publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/griddb.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","contentUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","width":200,"height":83,"caption":"Fixstars"},"image":{"@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/griddbcommunity\/","https:\/\/x.com\/GridDBCommunity","https:\/\/www.linkedin.com\/company\/griddb-by-toshiba"]},{"@type":"Person","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/ca72185e9a3778df765a76313f789fd8","name":"Joshua Pascascio","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/872ef8be79cb5117c256feb4c279ac41b954bfba599d647db925185c449aff1c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/872ef8be79cb5117c256feb4c279ac41b954bfba599d647db925185c449aff1c?s=96&d=mm&r=g","caption":"Joshua Pascascio"},"url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/author\/joshua\/"}]}},"_links":{"self":[{"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/wp-json\/wp\/v2\/posts\/46565","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/wp-json\/wp\/v2\/users\/123"}],"replies":[{"embeddable":true,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/wp-json\/wp\/v2\/comments?post=46565"}],"version-history":[{"count":1,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/wp-json\/wp\/v2\/posts\/46565\/revisions"}],"predecessor-version":[{"id":51256,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/wp-json\/wp\/v2\/posts\/46565\/revisions\/51256"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/wp-json\/wp\/v2\/media\/22066"}],"wp:attachment":[{"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/wp-json\/wp\/v2\/media?parent=46565"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/wp-json\/wp\/v2\/categories?post=46565"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/wp-json\/wp\/v2\/tags?post=46565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}