Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-09-2007, 10:29 PM   #1
Registered: Nov 2006
Distribution: xubuntu
Posts: 454

Rep: Reputation: 31
Mysql question

Hey there

I am a computing student and have registered to Oracle
Well, I have a script called db.sql and i want to execute it using mysql
Could you please tell me the appropriate command to do that
I dont really know how to start mysql through the terminal window

Thanks for your time

PS:I am using Linux BackTrack (if that matters)
Old 01-09-2007, 10:41 PM   #2
Registered: Jul 2004
Distribution: Fedora
Posts: 241

Rep: Reputation: 31
If MySQL is already installed, you start the daemon with something like (as root):
service mysqld start
and you get to a mysql prompt where you can enter your SQL commands using just 'mysql'. Type 'mysql --help' for more options.
Old 01-10-2007, 01:22 AM   #3
Wim Sturkenboom
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
I don't think that it's a script, but a dump containing SQL queries that will probably populate a database. If so:

It might work but don't expect it to work as there might be differences between Oracle and MySQL.

The command to load your SQL file is
mysql < db.sql
You might have to pass a few options to mysql like the user and the database to use.

You can read more in the mysql manual (chapter backup and recovery). If you don't have it, I strongly suggest that you download it.


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
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
MySQL Question NoBrains Linux - Software 2 03-01-2004 10:10 PM
MySQL question Citizen Bleys Programming 2 08-15-2003 06:07 AM
Another mysql question dkc_ace Linux - Software 0 03-23-2003 04:10 PM
MYSQL Question stayathomemom Linux - Newbie 0 02-09-2003 05:52 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:57 AM.

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