LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-11-2003, 07:30 AM   #1
lomaree
Member
 
Registered: May 2003
Location: Qatar
Distribution: Suse
Posts: 60

Rep: Reputation: 15
problem in sql database administration


Hi


i can't run this file in linux . it's used to create tables in sql . createdb.sql , i want to run it without any db manager .is it possible
 
Old 06-11-2003, 08:19 AM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
You really don't provide enough details about your problem for anyone to make an informed reply. Posting your .sql file would help.

That said, I will hazard a guess. Many people use .sql extentsions on files that have a series of SQL commands. If that is what your file is, you need to have a database program like MySQL installed. There are lots of alternatives to MySQL, but basically you need a relational database program that uses SQL. Linux, all by itself, doesn't understand SQL and can't manage databases.
 
Old 06-11-2003, 09:04 AM   #3
lomaree
Member
 
Registered: May 2003
Location: Qatar
Distribution: Suse
Posts: 60

Original Poster
Rep: Reputation: 15
yes it is a file that have a series of SQL commands in it. used to create a database with particular entries in it automatically.. but i can't run it how do i do that
 
Old 06-11-2003, 09:20 AM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
You need to install a database program. Check out PostgreSQL or MySQL which are both open source databases. As I stated in my first reply, Linux doesn't understand SQL so you can't just run the file. You need to install a database program that understands SQL and can manage databases.
 
Old 06-11-2003, 09:52 AM   #5
lomaree
Member
 
Registered: May 2003
Location: Qatar
Distribution: Suse
Posts: 60

Original Poster
Rep: Reputation: 15
mysql is already installed in it, i mean i have installed it. i can create databases manual. but i have got this program in which it say all i have to do is run this file . but every time i run it , it does'nt do anything, it's suppose to create a database in mysql.. my question , how do i run this file .. do i have to run it within mysql if so then how
 
Old 06-11-2003, 10:58 AM   #6
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
Well, you are certainly going to want to consult the MySQL manual and read the section on batch mode. However the syntax is relatively simple:

shellprompt$ mysql -p < createdb.sql

This will first prompt you for your MySQL password, then will run the SQL commands in createdb.sql.
 
  


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
TOMCAT connect to MS SQL database shane200_ SUSE / openSUSE 1 06-01-2005 02:41 PM
TOMCAT and MS SQL database shane200_ Programming 0 05-31-2005 11:52 AM
database needed not sql herc222 Linux - Software 3 03-08-2004 08:34 AM
SQL question - are all database programs the same? BrianK Programming 2 02-24-2004 02:54 PM
SQL Database Administration GabeF Linux - Software 2 11-17-2002 08:28 PM


All times are GMT -5. The time now is 10:29 AM.

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