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 |
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. |
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
|
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.
|
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
|
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. |
All times are GMT -5. The time now is 01:12 PM. |