# msql2mysql

## Description

Initially, the MySQL C API was developed to be very similar to that of the\
mSQL database system.

Because of this, mSQL programs often can be converted relatively easily for use\
with MySQL by changing the names of their C API functions.

The `msql2mysql` utility performs the conversion of mSQL C API\
function calls to their MySQL equivalents.

{% hint style="warning" %}
**Warning:** `msql2mysql` converts the input file in place, so make a copy of the original before converting it.
{% endhint %}

## Example

```
shell> cp client-prog.c client-prog.c.orig
shell> msql2mysql client-prog.c
client-prog.c converted
```

After conversion, examine `client-prog.c` and make any necessary\
post-conversion revisions.

`msql2mysql` uses the [replace](/docs/server/clients-and-utilities/administrative-tools/replace-utility.md#options) utility to make the function name\
substitutions.

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/clients-and-utilities/legacy-clients-and-utilities/msql2mysql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
