MSQL2MYSQL(1)

πŸ“¦
version 13.0.2 Β· 6 versions
, in alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu resolute, ubuntu stonking

πŸ’– msql2mysql(1) β€” the MariaDB Database System glow-up πŸ’–

okay bestie, pull up a chair, we're talking about msql2mysql(1) and honestly? it's giving time capsule. it's a tiny little conversion gremlin from the MariaDB Database System and it has ONE job and it does it. let's get into it 🫢


✨ NAME ✨

msql2mysql β€” the lil tool that converts mSQL programs so they work with MariaDB πŸ’…


🌸 SYNOPSIS 🌸

msql2mysqlC-source-file ...

(yes the spacing is literally like that in the original, i am not touching it, that's canon fr fr 😭)


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so storytime πŸ“– back in the day, the MySQL C API was literally designed to be very similar to the C API for the mSQL database system. like, sisters. twins. same vibes. and because of that, mSQL programs can often be converted pretty easily for use with MariaDB β€” you basically just swap out the names of the C API functions and you're slaying ✨

that's where msql2mysql comes in. it does the conversion of mSQL C API function calls into their MariaDB equivalents. it's the translator. the middlewoman. the group chat admin πŸŽ€

⚠️ MAJOR WARNING BESTIE: msql2mysql converts the input file in place. like, it edits the file right there. so make a copy of the original before converting it, i am begging you πŸ˜­πŸ™ˆ

for example, use msql2mysql like this:

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

then β€” and this part is important β€” go look at client-prog.c and make any post-conversion revisions that may be necessary. it's not a set-it-and-forget-it situation, okay? go read your code. be a responsible main character πŸ“šπŸ’œ

oh and also? msql2mysql uses the replace utility to make all those function name substitutions. so if you wanna know the lore, go see replace(1). iykyk πŸ”₯


Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2025 MariaDB Foundation

This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/

(no cap, that's the whole license bit, read it, it matters πŸ’€)


🌈 SEE ALSO 🌈

For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/


πŸ’œ AUTHOR πŸ’œ

MariaDB Foundation (http://www.mariadb.org/)


and that's the whole page bestie!! πŸŽ€ this was MariaDB 11.8, dated 5 March 2025 β€” thank you for coming to my ted talk, go back up your files before you run anything, ily, bye βœ¨πŸ’–πŸ¦‹

πŸ“¦ where this page comes from