LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-13-2015, 09:13 AM   #1
Glenn D.
Member
 
Registered: May 2009
Location: ACT - Australia
Distribution: Opensuse x86_64 (Latest)
Posts: 132

Rep: Reputation: 26
From the command line What is the syntax syntax to import some data into mysql table


Hello
From the command line [linux], What is the command syntax to import some data into a mysql table ?

Using linux.
# which mysql
/usr/bin/mysql

The table has 20 columns in it.
The data file has about 900 rows in it
The data file a CSV file comma ',' seperated fields.
Thank you.
--Glenn
 
Old 03-13-2015, 09:26 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,940

Rep: Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211
Code:
mysql -u username -p password -e "query to execute" dbname
As for the actual query http://dev.mysql.com/doc/refman/5.6/en/load-data.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] run ps|grep command by script/command line ... ERROR: Unsupported option (BSD syntax) masuch Programming 4 05-23-2012 04:13 AM
Command line syntax Steve36810 Linux - Newbie 2 02-24-2009 02:29 PM
proxy.pac command line syntax mfran2002 Linux - Security 1 03-26-2007 05:54 AM
MySql ALTER TABLE syntax bulliver Linux - Server 6 08-16-2006 06:12 AM
xmms command line syntax xviddivxoggmp3 Linux - Software 11 03-12-2004 01:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration