LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 05-24-2005, 11:18 PM   #1
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,133

Rep: Reputation: 45
import data to mysql server


Hi i have a file containing the following text
CREATE TABLE `phpbb_posts_text` (
`post_id` mediumint(8) unsigned NOT NULL default '0',
`bbcode_uid` varchar(10) NOT NULL default '',
`post_subject` varchar(60) default NULL,
`post_text` text,
PRIMARY KEY (`post_id`)
) TYPE=MyISAM;

--
-- 'Áäåéáóìá äåäïìÝíùí ôïõ ðßíáêá `phpbb_posts_text`
--

INSERT INTO `phpbb_posts_text` VALUES (21, '98708dec1f', 'Äõíáôüôçôåò ðïõ Ý÷åôå óôï forum', '[b:98708dec1f]Ôï íÝï forum åßíáé ðñáãìáôéêüôçôá[/b:98708dec1f]\r\n\r\n¼ðùò èá åßäáôå üëïé óáò Ýãéíå ìéá ðëÞñç áíáíÝùóç óôï site ìáò . ÌÝóá óå áõôÞ ðåñéëáìâÜíåôå êáé Ýíá íÝï forum . Ïé ëüãïé ãéá ôçí áëë�[33;1HáãÞ áõôÞ åßíáé ðïëëïß\r\n• Äåí èá õðÜñ÷ïõí ðëÝïí åíï÷ëçôéêÝò äéáöçìßóåéò êáé äéáöçìéóôéêÜ ðáñÜèõñá\r\n• Ôï íÝï forum õðïóô4 ãëþóóåò ìéá áðü áõôÝò êáé ôá ÅëëçíéêÜ, Ýôóé þóôå íá âëÝðåôå ôá ðÜíôá óå ãëþóóá êáôáíïçôÞ (óôï ðñïößë óáò åðéëÝãåôáé óáí ãëþóóá
....skipped a bunch of lines

How i can import the following table with the data in to my database?
 
Old 05-25-2005, 12:37 AM   #2
pembo13
Member
 
Registered: May 2003
Location: Caribbean
Distribution: Fedora Core2
Posts: 403

Rep: Reputation: 30
If you have terminal access:

$ mysql -u <username> -p <database> < phpbb_posts_text

That shoudl work.
 
  


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
Open Office Import Data Problem eggoz Linux - Software 1 07-26-2005 05:45 PM
mysql data import bijuhpd Linux - Newbie 1 03-05-2005 08:01 AM
Server crash, trying to recover mysql data from old HD? Vatoloco Linux - Software 2 06-20-2004 11:15 AM
phpMyAdmin Import data from file chrisbutts Linux - Newbie 1 04-22-2004 01:49 PM
data import into openoffice calc general4172 Linux - Software 0 09-24-2003 12:45 PM


All times are GMT -5. The time now is 06:13 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration