LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-21-2004, 12:29 AM   #1
kevinm2
Member
 
Registered: Aug 2004
Distribution: Redhat 7.2
Posts: 73

Rep: Reputation: 15
MySQL question


I was given a file faq.sql to create a table in a database. I am suppose to run it; so it creates a new table called faq. How do I run it phpMyAdmin. or from the shell?

Last edited by kevinm2; 08-21-2004 at 01:11 AM.
 
Old 08-21-2004, 02:03 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
From the shell :
mysql -u <admin name> -p <database name>
enter password: <admin password>
mysql>source /path/to/faq.sql

With phpmyadmin, just follow the instruction, select your database, then click on "sql" and choose your file from the button "browse"
 
Old 08-21-2004, 02:39 AM   #3
kevinm2
Member
 
Registered: Aug 2004
Distribution: Redhat 7.2
Posts: 73

Original Poster
Rep: Reputation: 15
Thank you for the reply. I had to created the table manually. But for the future, I will use your way . And also is there any way that this could be done from within phpMyAdmin.

Last edited by kevinm2; 08-21-2004 at 02:41 AM.
 
Old 08-21-2004, 02:44 AM   #4
kevinm2
Member
 
Registered: Aug 2004
Distribution: Redhat 7.2
Posts: 73

Original Poster
Rep: Reputation: 15
I am so sorry, you had already answered my question. I guess it's time to hit the bed. I have been on the computer for about 17 hours now! Thanks again.

Last edited by kevinm2; 08-21-2004 at 02:45 AM.
 
  


Reply



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... kith Linux - General 3 03-06-2004 06:40 PM
MySQL Question NoBrains Linux - Software 2 03-01-2004 10:10 PM
MySQL question TraCe66 Linux - Newbie 11 07-15-2003 02:35 PM
MySQL question ascii2k Linux - General 1 03-27-2002 04:48 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:19 PM.

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
Open Source Consulting | Domain Registration