Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Installing tables in MySQL...
Old 01-18-2004, 05:10 PM Installing tables in MySQL...
Average Talker

Posts: 26
Trades: 0
I've done a couple of searches online and come up blank...so maybe someone here knows how to do this...

I downloaded a program that contains a text file called sql.txt. In the installation instructions it tells me to: "Install the necessary tables in your database via the sql.txt file"

How in the blazes do I do that? I have CPanel and PhpMyAdmin.

Any help would be greatly appreciated...

Peace,

Wolf
http://www.webs4christ.com
AlphaWolf is offline
Reply With Quote
View Public Profile Visit AlphaWolf's homepage!
 
 
Register now for full access!
Old 01-18-2004, 09:03 PM
ACJavascript's Avatar
Humble Mod

Posts: 548
Location: CT, USA
Trades: 0
Hey alpha,

can you put the sql.txt file on here? either attach or post it?
__________________

Please login or register to view this content. Registration is FREE
- 100 Satisfied Customers - Custom Programming and Web Development
ACJavascript is offline
Reply With Quote
View Public Profile Visit ACJavascript's homepage!
 
Old 01-18-2004, 09:29 PM
Average Talker

Posts: 26
Trades: 0
Yeah i could...but actually there are 3 different modules that say the exact same thing...implying there is some magical way of pointing MySQL to the text file and having it read the instructions and create tables...

Each of the 3 files contains 'table creation' lingo that I could probably enter by hand somehow...somewhere in PhpMyAdmin...lol...

OK...here is the text from one of them...again they are all similar in command structure....

CREATE TABLE nuke_internet_radio_settings (
modulename varchar(30) NOT NULL default '',
auto_start tinyint(1) NOT NULL default '0',
picture tinyint(1) NOT NULL default '0',
picture_dir varchar(50) NOT NULL default '',
defpicture tinyint(1) NOT NULL default '0',
nopicture_name varchar(50) NOT NULL default ''
) TYPE=MyISAM;


INSERT INTO nuke_internet_radio_settings VALUES ('Internet_Radio', 0, 1, 'images/internet_radio/', 1, 'radio_on.gif');


CREATE TABLE nuke_internet_radio (
radio_id int(10) unsigned NOT NULL auto_increment,
radio_name varchar(20) NOT NULL default '',
radio_stream varchar(75) NOT NULL default '',
radio_url varchar(50) NOT NULL default '',
radio_picture varchar(50) NOT NULL default '',
radio_language varchar(30) NOT NULL default '',
PRIMARY KEY (radio_id)
) TYPE=MyISAM;

INSERT INTO nuke_internet_radio VALUES ('', 'Yorin FM', 'http://media.rtl.nl/yorinfm/on_air/yorin.asx', 'http://www.yorin.nl', 'yorin.gif', 'dutch');
INSERT INTO nuke_internet_radio VALUES ('', 'Radio 3FM', 'http://www.omroep.nl/radio3/live20.asx', 'http://www.omroep.nl/radio3/', '', 'dutch');
INSERT INTO nuke_internet_radio VALUES ('', 'Sky radio', 'http://www.skyradio.nl/player/skyradio.asx', 'http://www.skyradio.nl', '', 'dutch');
INSERT INTO nuke_internet_radio VALUES ('', 'Hotradio', 'http://www.hotradio.nl/sound/stream/livestream.asx', 'http://www.hotradio.nl', '', 'dutch');
INSERT INTO nuke_internet_radio VALUES ('', 'Noordzee FM', 'mms://hollywood.win2k.vuurwerk.nl/noordzee', 'http://www.noordzeefm.nl', '', 'dutch');
INSERT INTO nuke_internet_radio VALUES ('', 'Radio NRG', 'http://www.radionrg.com/listenlive.asx', 'http://www.radionrg.com', '', '');
INSERT INTO nuke_internet_radio VALUES ('', 'Baja radio', 'http://www.bajaradio.com/vuurwerk.asx', 'http://www.bajaradio.com', '', 'dutch');
INSERT INTO nuke_internet_radio VALUES ('', 'Capital FM', 'http://www.radio-now.co.uk/l/capitalfmlo.asx', 'http://www.capitalfm.com', 'capital.gif', 'english');
INSERT INTO nuke_internet_radio VALUES ('', 'Virgin Radio', 'http://www.smgradio.com/core/audio/wmp/live.asx?service=vr', 'http://www.virginradio.co.uk', '', 'english');
INSERT INTO nuke_internet_radio VALUES ('', 'Flash FM', 'http://www.flashfm.com/live/buildasx.asp?service=flashfmuk22', 'http://www.flashfm.com/', '', 'english');
INSERT INTO nuke_internet_radio VALUES ('', 'BBC Radio 1', 'http://www.bbc.co.uk/radio1/realaudio/media/r1live.rpm', 'http://www.bbc.co.uk/radio1/', '', 'english');


Peace,

Wolf
http://www.webs4christ.com
AlphaWolf is offline
Reply With Quote
View Public Profile Visit AlphaWolf's homepage!
 
Old 01-18-2004, 09:38 PM
ACJavascript's Avatar
Humble Mod

Posts: 548
Location: CT, USA
Trades: 0
okay what you could do is make a php script that reads the file and sends it to a SQL query. That would install it for you.

What host do you have?
__________________

Please login or register to view this content. Registration is FREE
- 100 Satisfied Customers - Custom Programming and Web Development
ACJavascript is offline
Reply With Quote
View Public Profile Visit ACJavascript's homepage!
 
Old 01-18-2004, 10:20 PM
WaHoOoO!'s Avatar
Mentally Unstable Tugboat Captain

Posts: 797
Name: Chad
Location: /usr/bin/perl
Trades: 0
In PHPMyAdmin, there's a place where you can upload that file and it installs it for you.

From the main screen click 'Databases'.
You will see a list of your databases, click the one you want.
At the top, click 'SQL'
Click 'Browse' and then find the SQL file you want.
Make sure 'Autodetect' is checked.
Click 'Go'

This works 99% of the time. When it doesn't work is one of two reasons: The SQL file contains some incorrect commands (and your's appears to be fine), or your database is corrupted.
__________________
He's baaaaaaaack....
WaHoOoO! is offline
Reply With Quote
View Public Profile Visit WaHoOoO!'s homepage!
 
Old 01-18-2004, 10:37 PM
Average Talker

Posts: 26
Trades: 0
Hey WaHoo...thanks... I actually JUST figured that out... backed up my databases...muddled around til I found out that executing a query lets me browse to a text file... changed the database prefix in the text file to my prefix....prayed a LOT and hit GO...chuckle

It worked...

I knew there had to be something simple...though *why* it didnt even give a hint of it in the install text I will never know...

Peace,

Wolf
http://www.webs4christ.com
AlphaWolf is offline
Reply With Quote
View Public Profile Visit AlphaWolf's homepage!
 
Old 01-24-2004, 05:19 PM
Novice Talker

Posts: 13
Location: Oregon
Trades: 0
In the future.. if you're at the shell prompt, just type this line:

mysql -u [your username] -p [db_name] < [file to import]

It will prompt you for the password for the username you specified then import all the data from the text file.
__________________
Tutorialized.com
Free Tutorials for Everything!
tutorialized is offline
Reply With Quote
View Public Profile Visit tutorialized's homepage!
 
Reply     « Reply to Installing tables in MySQL...
 

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.25947 seconds with 12 queries