Wednesday, October 7, 2020

MySQL ODBC Driver:

These instructions assume you have installed MySQL locally or you are connecting to a cloud hosted MySQL database. 

And you have created the Parts schemas and tables in the MySQL database. 

Note if are using a hosted MySQL solution then Download MySQL Workbench

You must have a MySQL user account with the appropriate permissions.

Install ODBC Drivers for MySQL and Altium:

Then try Connecting to your MySQL database again.



Jan 2024 - Recommended MySQL Configuration for Local Area Networks















As of 9/17/2023

For MySQL 8.0 use ODBC Driver 8.00.32.00 or Older !

MySQL ODBC Drivers (newer than 8.00.32.00) are NOT compatible with Office 365  and Access 16, please install MySQL ODBC driver 8.00.32.00 or an older version of MySQL ODBC driver 8.xx.xx.xx.

After completing the above steps.

In Altium create a *.DBLIB library that is linked to the MySQL parts database.


If Altium fails to connect  . . .

Then try Connecting to your MySQL database again.

Troubleshooting ODBC Connections:

In the Windows Search Box enter ODBC

Open ODBC x64 and select the Drivers Tab

Verify the MySQL the ODBC 8.x ANSI Driver is installed

Tip: 

Select the Archives Tab to locate older versions of MySQL ODBC Drivers.











Contact Parts if you have questions or need technical support.

That's It !

Tuesday, September 29, 2020

LOAD DATA for MySQL

Load Data can be used to send bulk records from a CSV file to a MySQL table.

The first step is to dump the database records to a utf-8 *.CSV file.

sql - exporting text file with utf-8 encoding in ms access - Stack Overflow

Then use MySQL Load Data. . .

What is LOAD DATA and how does it work | MySQL Server Blog

For Load Data Errors see:

MySQL LOAD DATA LOCAL INFILE on WINDOWS not WORKING - Stack Overflow

Useful MySQL Workbench Query Statements













SET GLOBAL local_infile = 1;
show variables like '%secure_file_priv%';
show variables like 'local_infile';

Pipes are safer than commas or semi-colons

Remote Server
LOAD DATA INFILE 'file'
IGNORE INTO TABLE table
CHARACTER SET UTF8
FIELDS TERMINATED BY '|'
OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'

Local Server

LOAD DATA LOCAL INFILE "file" INTO TABLE tblName CHARACTER SET UTF8 COLUMNS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '"';

Other options not shown above include:  Ignore duplicates.

That's it !

Thursday, April 16, 2020

Bill of Material - BOM Part Numbers with Leading Zeros

Leading zeros can be dropped from Mfr Part Numbers in Excel if the part number is numeric and the cells in the Excel worksheet column are formatted as General, which is the default format in Excel. To preserve the leading zeros format the cells in the Excel template as text.

Example:  Molex P/N 0039281043

Try the Generic XLS File Format to preserve leading zeros in part numbers. 

You can find example BOM templates in the Parts Download.



That's it !