Forum     

Go Back   Digit Technology Discussion Forum > Software > Open Source
Register FAQ Calendar Mark Forums Read

Open Source A place where you can talk to like-minded people about the fastest growing software movement today! Discuss anything and everything about Open Source software and Operating Systems.


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 17-07-2008, 09:44 AM   #1 (permalink)
Right Off the Assembly Line
 
Join Date: Mar 2008
Location: At my Home :) .. Jodhpur
Posts: 35
Exclamation linux n mysql


friends..

i m a novice user of linux, as i have just started learning it during my summer internship.

i m developing a project in linux which includes connectivity to mysql.

i am having data in .txt files and want to insert it into MySql database table.

please help me out how can i do this?

sorry , if you think it is a very silly ques.. but jst remember that i m a newbie to linux.
pls help...
__________________
!> I-I /-\ \/\/ /-\ l_
dhawalsant is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 17-07-2008, 09:20 PM   #2 (permalink)
eWebGuru
 
ahref's Avatar
 
Join Date: Mar 2006
Location: Dehradun
Posts: 427
Default Re: linux n mysql

change it to csv and use query

load data local "filename.txt" ....
__________________
Windows and linux hosting at http://www.ewebguru.com
Get $50 per blog post PM me for details.
ahref is offline  
Old 17-07-2008, 10:10 PM   #3 (permalink)
din
Tribal Boy
 
din's Avatar
 
Join Date: Jun 2004
Location: Cochin , Kerala
Posts: 1,724
Default Re: linux n mysql

You can also use phpmyadmin which is a web interface for managing mysql. Pretty easy.
din is offline  
Old 23-07-2008, 02:54 PM   #4 (permalink)
Right Off the Assembly Line
 
Join Date: Mar 2008
Location: At my Home :) .. Jodhpur
Posts: 35
Default Re: linux n mysql

thanks guys,,,,

n yes can u tell me the use of "local" in this command
__________________
!> I-I /-\ \/\/ /-\ l_
dhawalsant is offline  
Old 25-07-2008, 04:41 AM   #5 (permalink)
18 Till I Die............
 
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
Default Re: linux n mysql

Quote:
Originally Posted by ahref View Post
load data local "filename.txt" ....
Or alternatively, you can use mysqlimport command.
Code:
man mysqlimport
__________________
http://www.bash.org/?258908
mehulved is offline  
Old 25-07-2008, 09:54 AM   #6 (permalink)
The No.1 Stupid
 
~Phenom~'s Avatar
 
Join Date: May 2005
Location: CYBERYARD
Posts: 1,708
Default Re: linux n mysql

LOAD DATA INFILE "filename.txt" INTO TABLE tablename FIELDS TERMINATED BY ',';

Modify it to suit your needs. And, in ubuntu the filename.txt should be placed in /var/lib/mysql/your_db_name or where mysql is installed.
__________________
n00b forever...
~Phenom~ is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysql Help Desi-Tek.com Open Source 4 27-11-2006 12:24 PM
help in PHP-mysql bukaida Open Source 7 08-11-2006 03:20 PM
MySql in LINUX? paragkalra Open Source 10 17-10-2006 01:40 PM
php and mysql arunks QnA (read only) 3 12-08-2006 07:58 PM
MySQL - GUI / CLI Trinity QnA (read only) 7 23-07-2005 07:25 PM

 
Latest Threads
- by gforz
- by soumya
- by Sujeet
- by icebags
- by Charan

Advertisement




All times are GMT +5.5. The time now is 02:43 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2