My Experiences with Databases & More

Oracle-MySQL-SQL SERVER-Python-Azure-AWS-Oracle Cloud-GCP etc

  • Enter your email address to follow this blog and receive notifications of new posts by email.

  • Total Views

    • 558,488 hits
  • $riram $anka


    The experiences, Test cases, views, and opinions etc expressed in this website are my own and does not reflect the views or opinions of my employer. This site is independent of and does not represent Oracle Corporation in any way. Oracle does not officially sponsor, approve, or endorse this site or its content.Product and company names mentioned in this website may be the trademarks of their respective owners.

Error using MySQL Workbench – unhandled exception list index out of range.

Posted by Sriram Sanka on December 10, 2021


While Loading the data using MySQL Workbench, you may hit the error unhandled exception list index out of range

There are no clues in the workbench log files, in such cases you can load the Data Using MySQL LOAD DATA Statement . Which will load the data very fast and without errors.

mysql> LOAD DATA LOCAL INFILE "C:/\Patient.csv"
-> INTO TABLE xxhc_patient
-> FIELDS TERMINATED BY ','
-> ENCLOSED BY '"'
-> LINES TERMINATED BY '\n'
-> IGNORE 1 ROWS;
Query OK, 58 rows affected, 232 warnings (0.04 sec)
Records: 58 Deleted: 0 Skipped: 0 Warnings: 232

In case if you get the following errors , run the below commands and re-execute load data statements.

ERROR: Loading local data is disabled - this must be enabled on both the client and server sides

ERROR 2068 (HY000): LOAD DATA LOCAL INFILE file request rejected due to restrictions on access.

mysql> SET GLOBAL local_infile=1;

mysql --local_infile=1 -u<username> -p<Password> DB_NAME

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: