Re: FN-FORUM simple mysql problem
date posted 25th April 2001 22:39
On Wed, 25 Apr 2001 13:54:20 +0100, [EMAIL REMOVED] said:
Rob,
>I can telnet into my account, and they've set up the database nuke. The
>command I've been using to try to make the nuke.sql expand into the nuke
>database is the following:
>
>nuke < sql/nuke.sql
Didn't see an answer to this, so here's my guess.
I've never used phpNuke myself, but this isn't the command you want in
any situation.
To import a file containing a series of commands into mysql from the
command line you need to do something like:
mysql -u user -p database < file.sql
Where "user" is your username (in Mysql, not the OS. They might be the
same but don't have to be) "database" is the name of the database and
"file.sql" is the file containing the commands you want to run. The "-p"
flag tell mysql to ask for a password from you.
So, for example, if I want to import test.sql into database temp3 with a
user name of garrett I would type:
mysql -u garrett -p temp3 < /path/to/test.sql
>on return, this produces a new line, which I presume means the command is
>successful, however I'm still getting the
Nuke may have an executable or a shell script called nuke (probably to
start the server itself), it probably doesn't expect to get a load of sql
commands on STDIN.
As I said, this is all guesswork, it may have a wrapper for mysql called
'nuke', but those commands up there are the command line way to do it.
Need any more help, just holla.
G. "Just upgraded my production server to Redhat7.1, oooo, loverly
kernel2.4 goodness"
--
----------------------------------------------------------------------------
WORK: http://spiked.co.uk/
PLAY: http://polytechnic.co.uk/