{"id":1384,"date":"2010-11-30T06:58:36","date_gmt":"2010-11-30T06:58:36","guid":{"rendered":"http:\/\/kedar.nitty-witty.com\/?p=1384"},"modified":"2023-04-30T17:23:06","modified_gmt":"2023-04-30T17:23:06","slug":"using-load-data-infile-with-stored-procedure-workaround-mysql","status":"publish","type":"post","link":"https:\/\/kedar.nitty-witty.com\/blog\/using-load-data-infile-with-stored-procedure-workaround-mysql","title":{"rendered":"MySQL Load Data Infile with Stored Procedure"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Did you ever need to run LOAD DATA INFILE in a procedure? May be to automate or dynamically perform the large data file load to the MySQL database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this blog post, we will walk you through how to use a stored procedure and Load Data Infile syntax to efficiently load data into MySQL. This will also provide step-by-step instructions on how to create a table, a sample file to load, a shell script, and a stored procedure. By following these instructions, you will be able to effortlessly load data into MySQL.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So here we will use Load Data syntax to load file into MySQL Server in a Stored procedure. Yep! It&#8217;s a workaround.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Download MySQL UDF<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@localhost kedar]# wget http:\/\/www.mysqludf.org\/lib_mysqludf_sys\/lib_mysqludf_sys_0.0.3.tar.gz<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><em>[refer: http:\/\/www.mysqludf.org\/]<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Update:<\/strong> https:\/\/web.archive.org\/web\/20111016004142\/http:\/\/www.mysqludf.org\/lib_mysqludf_sys\/lib_mysqludf_sys_0.0.3.tar.gz<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Extract and Install MySQL UDF<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@localhost kedar]# tar -xzvf lib_mysqludf_sys_0.0.3.tar.gz<br>install.sh<br>lib_mysqludf_sys.c<br>lib_mysqludf_sys.html<br>lib_mysqludf_sys.so<br>lib_mysqludf_sys.sql<br>Makefile<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@localhost kedar]# sh install.sh<br>Compiling the MySQL UDF<br>gcc -Wall -I\/usr\/include\/mysql -I. -shared lib_mysqludf_sys.c -o \/usr\/lib\/lib_mysqludf_sys.so<br>MySQL UDF compiled successfully<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Please provide your MySQL root password<br>Enter password:<br>MySQL UDF installed successfully<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Create function sys_exec<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE FUNCTION sys_exec RETURNS INT SONAME 'lib_mysqludf_sys.so';<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">sys_exec &#8211; executes an arbitrary command, and returns it&#8217;s exit code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>You also can similarly create functions:<\/strong><br>sys_eval &#8211; executes an arbitrary command, and returns it&#8217;s output.<br>sys_get &#8211; gets the value of an environment variable.<br>sys_set &#8211; create an environment variable, or update the value of an existing environment variable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to load text file to MySQL using Stored Procedure &amp; Load Data Infile syntax:<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-1. Creating table:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE `t` ( `id` int(2) default NULL ) ENGINE=MyISAM<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-2. Create a sample file to load:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vi loadtest.txt<br>1<br>2<br>3<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-3. Create a shell script:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/tmp\/load.sh<br>mysql -u mysql_user -p mysql_password -e \"load data local infile \\\"$1\\\" into table $2;\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-4. Create a Stored Procedure:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DELIMITER $$<br>DROP PROCEDURE IF EXISTS `load_data_SP` $$<br>CREATE PROCEDURE `load_data_SP` (in_filepath varchar(100),in_db_table varchar(100))<br>BEGIN<br>declare exec_str varchar(500);<br>declare ret_val int;<br>set exec_str=concat(\"sh \/tmp\/load.sh \",in_filepath,\" \", in_db_table);<br>set ret_val=sys_exec(exec_str);<br>if ret_val=0 then<br>select \"Success\" as Result;<br>else<br>select \"Please check file permissions and paths\" as Result;<br>end if;<br>END $$<br>DELIMITER ;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 5. Execute:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CALL `load_data_SP`('\/tmp\/loadtest.txt' , 'test.t');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">&#8230;and that&#8217;s it Stored Procedure will return Success or Failure accordingly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure you&#8217;re having file permissions well set and MySQL can access the files.<br>Here I&#8217;ve kept the files under \/tmp directory with chmod 777 &amp; chown mysql:mysql to remove the permission-issue possibility.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hope this helps.<\/p>\n","protected":false},"excerpt":{"rendered":"Did you ever need to run LOAD DATA INFILE in a procedure? May be to automate or dynamically perform the large data file load to the MySQL database. In this&hellip;\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[8,377],"tags":[24,364,427,196,108,195],"class_list":["post-1384","post","type-post","status-publish","format-standard","category-mysql","category-mysql-articles","tag-code","tag-load-data-infile","tag-mysql","tag-mysql_udf","tag-stored-procedure","tag-sys_exec"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Using LOAD DATA INFILE with Stored Procedure Workaround to load csv files to MySQL Server\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Kedar\"\/>\n\t<meta name=\"google-site-verification\" content=\"_Bu1h5r0PxIC0D2jBVdmYN45RTeG9ogcX85XLkbG1qA\" \/>\n\t<meta name=\"msvalidate.01\" content=\"116B62074CBCA1BA99B8CCE09CCF2FB8\" \/>\n\t<meta name=\"keywords\" content=\"stored procedure,load data,mysql,code,load data infile,mysql_udf,sys_exec\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/kedar.nitty-witty.com\/blog\/using-load-data-infile-with-stored-procedure-workaround-mysql\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Change Is Inevitable | Kedar Vaijanapurkar&#039;s Blog for MySQL, technology and various subjects\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Using LOAD DATA INFILE with Stored Procedure Workaround-MySQL | Change Is Inevitable\" \/>\n\t\t<meta property=\"og:description\" content=\"Using LOAD DATA INFILE with Stored Procedure Workaround to load csv files to MySQL Server\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/kedar.nitty-witty.com\/blog\/using-load-data-infile-with-stored-procedure-workaround-mysql\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2010-11-30T06:58:36+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-04-30T17:23:06+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Using LOAD DATA INFILE with Stored Procedure Workaround-MySQL | Change Is Inevitable\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Using LOAD DATA INFILE with Stored Procedure Workaround to load csv files to MySQL Server\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/using-load-data-infile-with-stored-procedure-workaround-mysql#article\",\"name\":\"Using LOAD DATA INFILE with Stored Procedure Workaround-MySQL | Change Is Inevitable\",\"headline\":\"MySQL Load Data Infile with Stored Procedure\",\"author\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/using-load-data-infile-with-stored-procedure-workaround-mysql#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kedar\"},\"datePublished\":\"2010-11-30T06:58:36+00:00\",\"dateModified\":\"2023-04-30T17:23:06+00:00\",\"inLanguage\":\"en-US\",\"commentCount\":35,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/using-load-data-infile-with-stored-procedure-workaround-mysql#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/using-load-data-infile-with-stored-procedure-workaround-mysql#webpage\"},\"articleSection\":\"MySQL, MySQL-Articles, code, Load data infile, MySQL, mysql_udf, stored procedure, sys_exec\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/using-load-data-infile-with-stored-procedure-workaround-mysql#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql#listItem\",\"name\":\"MySQL\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql#listItem\",\"position\":2,\"name\":\"MySQL\",\"item\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-articles#listItem\",\"name\":\"MySQL-Articles\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-articles#listItem\",\"position\":3,\"name\":\"MySQL-Articles\",\"item\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-articles\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/using-load-data-infile-with-stored-procedure-workaround-mysql#listItem\",\"name\":\"MySQL Load Data Infile with Stored Procedure\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql#listItem\",\"name\":\"MySQL\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/using-load-data-infile-with-stored-procedure-workaround-mysql#listItem\",\"position\":4,\"name\":\"MySQL Load Data Infile with Stored Procedure\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-articles#listItem\",\"name\":\"MySQL-Articles\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#person\",\"name\":\"Kedar\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/using-load-data-infile-with-stored-procedure-workaround-mysql#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kedar\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\",\"url\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin\",\"name\":\"Kedar\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/using-load-data-infile-with-stored-procedure-workaround-mysql#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kedar\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/using-load-data-infile-with-stored-procedure-workaround-mysql#webpage\",\"url\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/using-load-data-infile-with-stored-procedure-workaround-mysql\",\"name\":\"Using LOAD DATA INFILE with Stored Procedure Workaround-MySQL | Change Is Inevitable\",\"description\":\"Using LOAD DATA INFILE with Stored Procedure Workaround to load csv files to MySQL Server\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/using-load-data-infile-with-stored-procedure-workaround-mysql#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\"},\"datePublished\":\"2010-11-30T06:58:36+00:00\",\"dateModified\":\"2023-04-30T17:23:06+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/\",\"name\":\"..::CHANGE is INEVITABLE::..\",\"description\":\"Kedar Vaijanapurkar's Blog for MySQL, technology and various subjects\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Using LOAD DATA INFILE with Stored Procedure Workaround-MySQL | Change Is Inevitable","description":"Using LOAD DATA INFILE with Stored Procedure Workaround to load csv files to MySQL Server","canonical_url":"https:\/\/kedar.nitty-witty.com\/blog\/using-load-data-infile-with-stored-procedure-workaround-mysql","robots":"max-image-preview:large","keywords":"stored procedure,load data,mysql,code,load data infile,mysql_udf,sys_exec","webmasterTools":{"google-site-verification":"_Bu1h5r0PxIC0D2jBVdmYN45RTeG9ogcX85XLkbG1qA","msvalidate.01":"116B62074CBCA1BA99B8CCE09CCF2FB8","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kedar.nitty-witty.com\/blog\/using-load-data-infile-with-stored-procedure-workaround-mysql#article","name":"Using LOAD DATA INFILE with Stored Procedure Workaround-MySQL | Change Is Inevitable","headline":"MySQL Load Data Infile with Stored Procedure","author":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author"},"publisher":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/kedar.nitty-witty.com\/blog\/using-load-data-infile-with-stored-procedure-workaround-mysql#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kedar"},"datePublished":"2010-11-30T06:58:36+00:00","dateModified":"2023-04-30T17:23:06+00:00","inLanguage":"en-US","commentCount":35,"mainEntityOfPage":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/using-load-data-infile-with-stored-procedure-workaround-mysql#webpage"},"isPartOf":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/using-load-data-infile-with-stored-procedure-workaround-mysql#webpage"},"articleSection":"MySQL, MySQL-Articles, code, Load data infile, MySQL, mysql_udf, stored procedure, sys_exec"},{"@type":"BreadcrumbList","@id":"https:\/\/kedar.nitty-witty.com\/blog\/using-load-data-infile-with-stored-procedure-workaround-mysql#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/kedar.nitty-witty.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql#listItem","name":"MySQL"}},{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql#listItem","position":2,"name":"MySQL","item":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql","nextItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-articles#listItem","name":"MySQL-Articles"},"previousItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-articles#listItem","position":3,"name":"MySQL-Articles","item":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-articles","nextItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/using-load-data-infile-with-stored-procedure-workaround-mysql#listItem","name":"MySQL Load Data Infile with Stored Procedure"},"previousItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql#listItem","name":"MySQL"}},{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/using-load-data-infile-with-stored-procedure-workaround-mysql#listItem","position":4,"name":"MySQL Load Data Infile with Stored Procedure","previousItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-articles#listItem","name":"MySQL-Articles"}}]},{"@type":"Person","@id":"https:\/\/kedar.nitty-witty.com\/blog\/#person","name":"Kedar","image":{"@type":"ImageObject","@id":"https:\/\/kedar.nitty-witty.com\/blog\/using-load-data-infile-with-stored-procedure-workaround-mysql#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kedar"}},{"@type":"Person","@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author","url":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin","name":"Kedar","image":{"@type":"ImageObject","@id":"https:\/\/kedar.nitty-witty.com\/blog\/using-load-data-infile-with-stored-procedure-workaround-mysql#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kedar"}},{"@type":"WebPage","@id":"https:\/\/kedar.nitty-witty.com\/blog\/using-load-data-infile-with-stored-procedure-workaround-mysql#webpage","url":"https:\/\/kedar.nitty-witty.com\/blog\/using-load-data-infile-with-stored-procedure-workaround-mysql","name":"Using LOAD DATA INFILE with Stored Procedure Workaround-MySQL | Change Is Inevitable","description":"Using LOAD DATA INFILE with Stored Procedure Workaround to load csv files to MySQL Server","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/using-load-data-infile-with-stored-procedure-workaround-mysql#breadcrumblist"},"author":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author"},"creator":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author"},"datePublished":"2010-11-30T06:58:36+00:00","dateModified":"2023-04-30T17:23:06+00:00"},{"@type":"WebSite","@id":"https:\/\/kedar.nitty-witty.com\/blog\/#website","url":"https:\/\/kedar.nitty-witty.com\/blog\/","name":"..::CHANGE is INEVITABLE::..","description":"Kedar Vaijanapurkar's Blog for MySQL, technology and various subjects","inLanguage":"en-US","publisher":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/#person"}}]},"og:locale":"en_US","og:site_name":"Change Is Inevitable | Kedar Vaijanapurkar's Blog for MySQL, technology and various subjects","og:type":"article","og:title":"Using LOAD DATA INFILE with Stored Procedure Workaround-MySQL | Change Is Inevitable","og:description":"Using LOAD DATA INFILE with Stored Procedure Workaround to load csv files to MySQL Server","og:url":"https:\/\/kedar.nitty-witty.com\/blog\/using-load-data-infile-with-stored-procedure-workaround-mysql","article:published_time":"2010-11-30T06:58:36+00:00","article:modified_time":"2023-04-30T17:23:06+00:00","twitter:card":"summary","twitter:title":"Using LOAD DATA INFILE with Stored Procedure Workaround-MySQL | Change Is Inevitable","twitter:description":"Using LOAD DATA INFILE with Stored Procedure Workaround to load csv files to MySQL Server"},"aioseo_meta_data":{"post_id":"1384","title":"Using LOAD DATA INFILE with Stored Procedure Workaround-MySQL | #site_title","description":"Using LOAD DATA INFILE with Stored Procedure Workaround to load csv files to MySQL Server","keywords":[{"label":"stored procedure","value":"stored procedure"},{"label":"Load Data","value":"Load Data"},{"label":"MySQL","value":"MySQL"},{"label":"code","value":"code"}],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-03-24 17:44:00","updated":"2025-08-16 19:11:23","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/kedar.nitty-witty.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\" title=\"MySQL\">MySQL<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-articles\" title=\"MySQL-Articles\">MySQL-Articles<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tMySQL Load Data Infile with Stored Procedure\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/kedar.nitty-witty.com\/blog"},{"label":"MySQL","link":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql"},{"label":"MySQL-Articles","link":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-articles"},{"label":"MySQL Load Data Infile with Stored Procedure","link":"https:\/\/kedar.nitty-witty.com\/blog\/using-load-data-infile-with-stored-procedure-workaround-mysql"}],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts\/1384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/comments?post=1384"}],"version-history":[{"count":10,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts\/1384\/revisions"}],"predecessor-version":[{"id":2862,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts\/1384\/revisions\/2862"}],"wp:attachment":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/media?parent=1384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/categories?post=1384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/tags?post=1384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}