DBF2MYSQL(1)
β¨ NAME β¨
dbf2mysql, mysql2dbf β the iconic little duo that converts between xBase and MySQL databases π¦
Okay so first things first, bestie: this is the DBF2MYSQL(1) page, straight outta the General Commands Manual, and it's literally about two programs who are each other's mirror image. No cap.
πΈ SYNOPSIS πΈ
dbf2mysql [-v[v]] [-f] [-u|-l|-L] [-n] [-o field[,field]] [-e
conversion-file] [-s old-name=new-name[,old-name=new-name]] [-i
field[,field]] [-d database] [-t table] [-c[c]] [-p primary] [-h host]
[-F] [-q] [-r] [-x] [-C charset] [-P password] [-U user] dbf-file
mysql2dbf [-v[v]] [-u|-l] -d database -t table [-h host] [-q query] [-P
password] [-U user] dbf-file
π DESCRIPTION π
dbf2mysql takes an xBase file and sends queries to an MySQL server to insert it into an MySQL table. Like, it picks your dbf up, walks it over to MySQL, and is like "here u go bestie, ur home now" π
mysql2dbf dumps a MySQL table to a dbf file. The reverse slay. The other direction. The mirror-ball moment πͺ©
π OPTIONS π
-vβ produce some status output. A lil crumb of info, as a treat.-vvβ more verbose. She's talking more now.-vvvβ even more verbose: produce a progress report. Full commentary mode, she will narrate her whole life. π-fβ translate all field names in the xBase file to lowercase.-uβ translate all text in the xBase file to UPPERCASE.-lβ translate all text in the xBase file to lowercase.-Lβ use LOCAL INFILE for table loading in MySQL.-nβ allow NULL fields:'NOT NULL'will be not added in table creation statement. (Yes, that's how it's worded, and yes, that means'NOT NULL'just doesn't show up. She's free, she's unconstrained, she's NULL π)-o field[,field[,...]]β list fields to insert into MySQL database. Primary use is to ease import of complex dbf files where we want only few fields. NOTE:-ois processed before substitution (-s), so you have to use dbf field names here. Do not come for me with MySQL names, the order of operations said no π«Ά-e conversion-fileβ specify file for CHAR fields conversion. File format is: 1st line: number of characters to convert (number of lines). Further lines:<char_to_convert> <char_after_conversion>.-s old-name=new-name[,old-name=new-name[,...]]β takes a list of field name/new field name pairs. Primary use is to avoid conflicts between field names and MySQL reserved keywords. When the new field name is empty, the field is skipped in both the CREATE clause and the INSERT clauses, i.e. it will not be present in the MySQL table. For example:
-s ORDER=HORDER,REMARKS=,STAT1=STATUS1
-i field[,field[,...]]β list fields to be indexed. MySQL field names should be used here. (Note: here it's MySQL names, unlike-o. The plot twist of the century.)-d databaseβ select the database to insert into. Default is'test'.-t tableβ select the table to insert into. Default is'test'.-c[c]β create table if one doesn't exist already. If the table already exists, drop it and build a new one. The default is to insert all data into the named table. If-ccis specified, no records will be inserted.-p primaryβ select the primary key. You have to give the exact field name. Exact. Character for character. She is not doing fuzzy matching, babes π-h hostβ select the host to insert into. Untested. (RIP, she's out here raw-dogging the network layer π)-Fβ fixed length records. (By default CHAR is saved as VARCHAR.)-qβ two whole moods depending on which program you're in:dbf2mysql: "Quick" mode. Inserts data via temporary file using'LOAD DATA INFILE'MySQL statement. This increased insertion speed on my PC 2-2.5 times. Also note that during whole'LOAD DATA'affected table is locked.mysql2dbf: specify custom query to use.
-rβ trim trailing and leading whitespace from CHAR type fields data. A little grooming moment for your strings βοΈ-xβ start each table with_recand_timestampfields.-C charsetβ specify the charset to use in table.-P passwordβ specify password on the MySQL server.-U userβ specify user on the MySQL server.
π BUGS π
mysql2dbfcan't write MEMO files at this time. It simply cannot, and she will not pretend otherwise.- Possibly incorrect field lengths for REAL numbers. Maybe. Possibly. We don't know. Live ur truth.
π AUTHORS π
- Originally written by Maarten Boekhold
<boekhold@cindy.et.tudelft.nl>, Oct 1995. - Patched for MySQL by Michael Widenius
<monty@analytikerna.se>, 3 Nov 1996. - Manual page written for Debian GNU/Linux from README by Heiko Schlittermann
<heiko@lotte.sax.de>, Aug 1997; updated by Matej Vela<vela@debian.org>, Nov 2001. New options available added by Francesco P Lovergine<frankie@debian.org>, Dec 2020.
The way this page has been getting glow-ups since 1995? Generational. The lore is deep π§
π COPYRIGHT π
Use this piece of software as you want, modify it to suit your needs, but please leave my name in place ok? :) β and honestly? valid. A tiny ask. Respect the author's name, it costs nothing π
β DISCLAIMER β
The authors do not accept any responsibility for possible damage you get as result of using this program. So like, back up ur data first bestie, we are not liable, we are merely vibes π
That's the whole page! This gem comes to you courtesy of the Debian Project, dated 2020-12-29, and the manual name is, of course, DBF2MYSQL(1) β go forth and convert responsibly πβ¨π¦
π¦ where this page comes from
- debian bookworm: dbf2mysql 1.14a-7+b1 Β· LicenseRef-public-domain
- debian trixie: dbf2mysql 1.14a-7+b1 Β· LicenseRef-public-domain
- ubuntu jammy: dbf2mysql 1.14a-7 Β· LicenseRef-public-domain
- ubuntu noble: dbf2mysql 1.14a-7 Β· LicenseRef-public-domain
- ubuntu questing: dbf2mysql 1.14a-7build1
- ubuntu resolute: dbf2mysql 1.14a-7build2 Β· LicenseRef-public-domain
- ubuntu stonking: dbf2mysql 1.14a-8 Β· LicenseRef-public-domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms