Gossamer Forum
Home : Products : Others : MySQLMan :

newbie, how to upload a .sql file?

Quote Reply
newbie, how to upload a .sql file?
I have a canned banner-rotate program that utilizes scripts and one .sql file (see below). I've been going nuts in utilizing my web hosts MySQL command feature and as well Access and MyODBC to connect to my host's MySQL. In any event, all I need to do is upload this single .sql file but I don't have a clue if it's possible or not. Can MysqlMan upload a ready-made .sql file?

Here's the .sql file. I'm just learning so I am not even sure if I can manually make this file?


CREATE TABLE banners (
account char(25) DEFAULT 'account' NOT NULL,
startdate char(50) DEFAULT 'startdate' NOT NULL,
username char(12) DEFAULT 'username' NOT NULL,
password char(12) DEFAULT 'password' NOT NULL,
imagefile char(100) DEFAULT 'imagefile' NOT NULL,
url char(100) DEFAULT 'url' NOT NULL,
impressions int,
clickthroughs int,
expire int,
startjulean int,
stopjulean int,
expiretype char(25) DEFAULT 'type' NOT NULL,
email char(50) DEFAULT 'email' NOT NULL,

PRIMARY KEY(account)
);

CREATE TABLE system (
startdate char(25) DEFAULT 'startdate' NOT NULL,
username char(12) DEFAULT 'username' NOT NULL,
password char(12) DEFAULT 'password' NOT NULL,
impressions int,
clickthroughs int,
startjulean int,
accountcounter int,
PRIMARY KEY(username)
);

INSERT INTO system VALUES ('','adminusername','adminpassword','0','0','0','0');

Quote Reply
Re: newbie, how to upload a .sql file? In reply to
Use telnet to telnet to your server, then run whatever command is required by your mysql server to gain access to mysql, then just copy and paste the entire .sql file into the telnet prompt. If the sql statements are correctly written, the mysql telnet session will create the tables in your database.

Harrison


"I've got if's pretty good, but that's about it"
Quote Reply
Re: newbie, how to upload a .sql file? In reply to
The SQL Monitor in MySQLMan can be used instead of telnet. Much easier Smile

Quote Reply
Re: newbie, how to upload a .sql file? In reply to
MySQLMan is _much_ easier than telnet.

I've even quit using PHPMyAdmin. The new version 2.01 of phpMyAdmin requires a recompile of PHP (it seems). I'm not sure I'm going to do that. Might create an apache that has PHP in it, and just start it on a funky port when I need it.

If you look, on the PHP site, they have a blurb of the differences between php and perl. Perl _is_ more powerful but php is designed for HTML scripting. I'll stick with Perl :) And I'm going to try emb_perl at a later date for scripting replacements for SSI.

But, the point is, this program has matured to the extent that it's a complete replacement for anything else out there.

What would be cool, is for Alex to see if the WebMin project would be interested in the code, and seeing if it could be modded to be a WebMin module. The current MySQL module is pretty 'thin' <G>





http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/