# Transition from MySQL to SingleStore

SingleStore is wire-compatible with MySQL, which makes it easy to transition your data and application from MySQL to SingleStore. To migrate your existing MySQL data, SingleStore recommends using Flow. [SingleStore Flow](https://docs.singlestore.com/db/v9.1/load-data/load-data-with-singlestore-flow.md) enables you to ingest large datasets with a guided, no-code interface that simplifies the migration process. It eliminates the need for manual schema conversion, custom scripting, and additional infrastructure. Unlike traditional migration methods, which can be resource intensive and operationally complex, Flow automates key migration steps to reduce overall migration time and complexity.

To transition your data and application from MySQL to SingleStore:

1. Migrate your data with SingleStore Flow.

2. Transition your application.

## 1. Migrate your Data with Flow

Use SingleStore Flow to migrate your data from MySQL to SingleStore. Refer to [Load Data with SingleStore Flow](https://docs.singlestore.com/db/v9.1/load-data/load-data-with-singlestore-flow.md) for more information.

SingleStore intentionally does not support all the MySQL features. Refer to [Unsupported MySQL Features](https://docs.singlestore.com/db/v9.1/connect-to-singlestore/connect-with-mysql/connect-with-mysql-client/unsupported-mysql-features.md) for more information.

You can also migrate your data using `mysqldump`, although it may require manual scripting and operational effort.

* *Load Data with mysqldump*

  ## Migrating Data with mysqldump`mysqldump` is a popular tool packaged with the MySQL client infrastructure. It queries the database to produce a series of `CREATE TABLE` and `INSERT` statements that can be replayed to restore the database.For more information on loading data from MySQL using `mysqldump`, refer to [Load Data from MySQL using mysqldump](https://docs.singlestore.com/db/v9.1/load-data/data-sources/replicate-data-from-mysql/load-data-from-mysql.md).> **📝 Note**: If you are running SingleStore Helios, use the endpoint to run the commands discussed in this topic.For simplicity, this guide assumes that both MySQL and SingleStore are running on your local machine and that MySQL is running on the standard port (3306) while SingleStore runs on 3307. Furthermore, it also assumes that both are accessible without a password by the root user.While moving your data from MySQL to SingleStore, there are a few considerations to keep in mind:- For most MySQL storage engines (MyISAM, InnoDB, etc), indexes are stored as B-trees. In SingleStore, indexes can be unidirectional lock-free skip lists (ascending or descending) or lock-free hash tables. Picking the right data structure for your index can have a significant impact on the performance of your application. While hash tables are optimized for key-value look ups, skip lists are extremely flexible for complex range scans and sorts (`ORDER BY`). While transferring your schema, you should audit your table definitions and investigate whether your indexes can be optimized for SingleStore. The default `BTREE` notation is converted into a skip list (see [Skip List Indexes](https://docs.singlestore.com/db/v9.1/create-a-database/other-schema-concepts/#UUID-d944e5f7-f309-7eab-50b1-66cf3f18dcef.md)) .
  - `mysqldump` will generate a few queries that are unsupported by SingleStore. For example, SingleStore does not support disabling `UNIQUE_CHECKS`. To make it easier to work with `mysqldump`, unsupported features are by default reported as warnings instead of errors. This functionality can be controlled by adjusting the `warn_level` variable. See [Unsupported MySQL Features](https://docs.singlestore.com/db/v9.1/connect-to-singlestore/connect-with-mysql/connect-with-mysql-client/unsupported-mysql-features.md) for more details. Some components of a `CREATE TABLE` statement might be blocked completely. If you run into this issue while loading a schema into SingleStore, you can manually massage the schema definition into something supported by SingleStore.
  - If the machine running SingleStore does not have enough memory to support the data you’re loading, the server will issue an error on offending `INSERT` statements indicating its out-of-memory state. In this case, you should upgrade your machine to one with more memory. If you copy your existing `memsqlbin` directory to the new machine, SingleStore will be able to reuse the schema definitions and `INSERT` statements that have already compiled.You should separate your schema and data into separate files, so that you can easily review and modify your schema if necessary. To produce a dump of your database, run something like:```shell
  mysqldump -h 127.0.0.1 -u root -B [database name] --no-data -r schema.sql

  ``````shell
  mysqldump -h 127.0.0.1 -u root -B [database name] --no-create-info -r data.sql

  ```You can then replay these files directly into SingleStore by running:```shell
  singlestore -h 127.0.0.1 -u root -P 3307 < schema.sql

  ``````shell
  singlestore -h 127.0.0.1 -u root -P 3307 < data.sql
  ```While this step runs, you can observe the `memsql.log` file to see which unsupported features have been ignored. After the import is completed, you can connect to SingleStore and start querying the tables directly.

## 2. Transition your Application

Update the connection configuration and credentials in your application to connect to a SingleStore deployment. Refer to [Connect to SingleStore](https://docs.singlestore.com/db/v9.1/connect-to-singlestore.md) for related information.

A key consideration to note is [Code Generation](https://docs.singlestore.com/db/v9.1/query-data/advanced-query-topics/code-generation.md), which plays a significant role in SingleStore's superior query execution performance. The first time SingleStore encounters a table schema, it generates and compiles code that implements the infrastructure around the table (memory allocation, inserts, deletes, iterations, etc.). Therefore, code generation makes loading a schema into SingleStore for the first time slower than with MySQL. Once a table is compiled, SingleStore is able to reuse it for the lifetime of your application - even if you restart the server or drop (and recreate) the table.

Similarly, when using `mysqldump` to migrate your data, the `INSERT` queries generated by `mysqldump` also have to be compiled exactly once.

When transitioning your application:

* Even if you’re connecting to SingleStore locally, use the explicit host `127.0.0.1` instead of `localhost`. Most MySQL clients will resolve `localhost` to use the global MySQL socket file and ignore the port setting. Refer to [FAQ](https://docs.singlestore.com/db/v9.1/introduction/faqs.md) for more information.
* As you run through the application, monitor the [memsql.log](https://docs.singlestore.com/db/v9.1/reference/troubleshooting-reference/trace-log.md) file.
* Queries that throw errors most likely correspond to unsupported syntax (refer to [SQL Reference](https://docs.singlestore.com/db/v9.1/reference/sql-reference.md) for supported SQL surface area).

***

Modified at: September 10, 2025

Source: [/db/v9.1/developer-resources/migrate-existing-applications/transition-from-mysql-to-singlestore/](https://docs.singlestore.com/db/v9.1/developer-resources/migrate-existing-applications/transition-from-mysql-to-singlestore/)

(An index of the documentation is available at /llms.txt)
