Back to Blog

Copying Data from Azure Database for MySQL with Fabric Pipelines - A Practical Setup Guide

November 30, 2026•10 min read•Michael Ridland

A surprising number of Australian businesses run something important on MySQL. Not the ERP, usually. It's the customer portal a contractor built in 2017, the booking system, the WooCommerce store that quietly turned into the main sales channel, or the line-of-business app that some vendor hosts on Azure Database for MySQL because it was cheaper than SQL Server. Then finance wants that data in Power BI next to everything else, and suddenly somebody has to get rows out of MySQL and into Fabric every night.

The Copy activity in a Fabric Data Factory pipeline is the most common way we do that. It's not glamorous work. But it's the kind of plumbing that, done badly, produces a report everyone stops trusting by March. So here's how we set it up, and what we've learned doing it for clients.

Microsoft's reference page for this is Configure Azure Database for MySQL in a Copy activity. It's worth keeping open while you build. What follows is the opinionated version.

What the Copy activity actually gives you

The Copy activity has the same shape regardless of connector. There's a Source tab, a Destination tab, a Mapping tab and a Settings tab. For Azure Database for MySQL, the connector works as both a source and a destination, although in practice we almost always use it as a source. Pushing data back into MySQL from Fabric does happen (reverse ETL into an app database, for example), but it's the minority case.

On the source side you choose your connection, then decide whether you're reading a Table or running a Query. Under the advanced settings you get a query timeout and the option to add additional columns, which is handy for stamping each row with the pipeline run ID or the load timestamp.

On the destination side, if you do write to MySQL, you get a pre-copy script, write batch size and write batch timeout settings. The pre-copy script is the one people actually use, typically to truncate a staging table before loading.

That's most of it. The connector is fairly thin, which is a good thing.

Setting up the connection

The connection is where most of the first-day friction lives, and almost none of it is Fabric's fault.

You'll need the server name (the full yourserver.mysql.database.azure.com address), the database name, a username and password. Basic authentication is the standard option here. If you've been hoping to use Entra ID authentication end to end, check the current documentation for what's supported for your setup before you promise it to your security team.

Then there's networking. This is the bit that eats an afternoon. If your MySQL flexible server has public access enabled with firewall rules, you need to allow Fabric's traffic through, and that list of IP ranges is not something you want to maintain by hand. If the server is on a private endpoint (which, for anything holding customer data, it should be), you'll need either a virtual network data gateway or an on-premises data gateway running on a VM that can reach the private network.

My honest opinion: for production workloads, go straight to the private network option. We've had clients start with public access "just to get it working" and then spend three months unpicking it when their security review lands. Do the gateway work up front.

One more thing on connections. Azure Database for MySQL single server was retired in 2024. If you've inherited a pipeline or a connection string that still points at a single server, that's a migration conversation, not a Fabric conversation. Flexible server is what you should be connecting to now.

Table or query? Use a query

The Copy activity will happily read a whole table. For a 5,000-row lookup table, fine. For anything else, write a query.

Here's why. A table read gives you every column and every row, every time. A query lets you select only the columns you need, filter to rows changed since the last load, and cast awkward MySQL types into something friendlier before they hit your lakehouse or warehouse.

A typical incremental pattern we use looks something like this:

SELECT id, customer_id, order_total, status, updated_at
FROM orders
WHERE updated_at > '@{pipeline().parameters.LastLoadTime}'

The LastLoadTime value comes from a lookup activity earlier in the pipeline that reads a watermark table. After the copy succeeds, another activity writes the new high-water mark back.

The catch, and it's a real one, is that this only works if the source table has a reliable updated_at column with an index on it. A lot of MySQL application databases don't. Some have the column but the app doesn't actually update it on every change. Before you build an incremental load, go and check. Run a few queries, talk to whoever maintains the app, and confirm the column means what you think it means. We've seen a client's "incremental" load silently miss about 4% of updates for months because a background job in the app wrote directly to the table without touching the timestamp.

If there's no reliable change column, you have three choices: full reload every time (fine for small tables), use binlog-based change data capture through a different tool, or ask the application team to fix it. Full reload is underrated. If the table is a few hundred thousand rows, just reload it nightly and move on with your life.

Data types will bite you somewhere

MySQL has some types that don't map cleanly to everything downstream. The ones that cause us the most grief:

  • Zero dates. MySQL in some configurations allows 0000-00-00 as a date value. Nothing else in the Microsoft world thinks that's a real date. Handle it in your source query with a NULLIF or CASE expression rather than hoping the copy will cope.
  • TINYINT(1) as boolean. MySQL commonly uses TINYINT(1) for true/false. Depending on how it's read, you may get a boolean or you may get an integer. Decide which one you want and cast explicitly.
  • Unsigned integers. An unsigned BIGINT can hold values bigger than a signed BIGINT in SQL-based destinations. Rare in practice, but auto-increment IDs on very busy tables can get there.
  • Character sets. If the database has a mix of latin1 and utf8mb4 columns (common in older apps), you can get mangled characters for names with accents or macrons. Māori names in a customer table are a good test case for Australian and New Zealand organisations.

The Mapping tab lets you import schemas and adjust type mappings, and it's worth doing that explicitly rather than relying on defaults. Explicit mappings also mean a schema change at the source fails loudly instead of quietly shifting columns.

Destination choices in Fabric

Most of the time, MySQL data lands in a Fabric lakehouse table or a Fabric warehouse. Our default for raw ingestion is a lakehouse, landed as Delta tables in a bronze or raw layer, then cleaned up with notebooks or SQL into something the business can use.

If the team is SQL-heavy and nobody wants to touch Spark, a warehouse is a perfectly reasonable landing spot too. I don't think there's a universally right answer here. Pick the one your team will actually maintain. The worst outcome is a lakehouse nobody understands because the one data engineer who liked PySpark left.

For loads into a lakehouse table, choose between append and overwrite carefully. Overwrite is simple and correct for full reloads. Append is what you want for incremental loads into a raw layer, followed by a merge step downstream. Mixing those up is one of the most common bugs we fix.

Performance and the source database

Here's something people forget. The MySQL server you're reading from is usually a production application database. Real customers are using it while your pipeline runs.

A large unfiltered SELECT * at 2pm on a Tuesday can slow the app down. We've had a client's booking site get noticeably sluggish because a well-meaning analyst triggered a full reload of a 40 million row table during business hours. Schedule heavy loads overnight (and remember that "overnight" in Perth is not "overnight" in Sydney if your app has national users). Read from a read replica if one exists. Flexible server supports read replicas, and pointing your pipeline at one is the single best thing you can do for both performance and goodwill with the app team.

The Settings tab lets you tune intelligent throughput optimisation and the degree of copy parallelism. For MySQL sources, cranking parallelism up doesn't always help, because the bottleneck is usually the source query rather than the copy engine. Start with defaults, measure, then change one thing at a time.

What's still a bit rough

A few honest observations from using this in client work:

  • Error messages from MySQL can be vague. A timeout, a network block and an authentication failure sometimes surface in ways that look similar at first glance. Test the connection from the gateway machine directly with a MySQL client before you blame Fabric.
  • No native CDC through the Copy activity. If you need true change data capture with deletes, the Copy activity on its own won't get you there. You'll be building watermark logic or using a different approach.
  • Deletes are invisible to watermark loads. If a row is deleted in MySQL, a timestamp-based incremental load never sees it. You either do periodic full reconciliations or get the app to soft-delete.
  • Monitoring needs work. The pipeline monitoring in Fabric shows you runs, durations and row counts, which is fine. But "the pipeline succeeded and copied zero rows" is often a failure in business terms, and you need to build alerts for that yourself.

None of these are deal breakers. They're just the things that separate a demo pipeline from one that runs unattended for two years.

How we'd approach a new MySQL integration

If you asked me to set this up for your organisation next week, the order would be roughly:

  1. Confirm the server type (flexible server), the networking model and whether a read replica exists.
  2. Set up the gateway and connection, and test it with a trivial query.
  3. Profile the source tables. Row counts, change columns, odd data types, character sets.
  4. Decide full reload versus incremental per table. Be honest about which tables really need incremental.
  5. Build one table end to end, including the watermark logic, explicit mappings and a zero-row alert.
  6. Template that pattern and roll it out to the rest, ideally driven by a metadata table so adding a new table is a row insert, not a new pipeline.

Step six is where good pipelines pay off. A metadata-driven pattern with a ForEach loop over a config table means your fiftieth table takes five minutes to add instead of half a day.

If you're working through a Fabric rollout and MySQL is one of a dozen sources you need to bring in, this is exactly the kind of work our Microsoft Data Factory consultants do every week. And if the bigger question is how Fabric should fit into your data platform overall, our Microsoft Fabric consultants can help you work that out before you've built forty pipelines in the wrong shape. Once the data is in, the payoff usually shows up in reporting, which is where our Power BI consultants come in.

The MySQL connector itself is simple. The hard part, as always, is understanding the data sitting behind it.