How to run a sql script sql script on mysql5

Michael Parson mparson at bl.org
Thu Apr 5 09:21:20 PDT 2012


On Wed, 4 Apr 2012, Michael Parchet wrote:
> 
> Hello,
>
> I have install the mysql5 port. I do a secure installation whith only the 
> root user and a password.
>
> So noe I wold like to run a sql script to create a database.
>
> I have tried the following command but this last has no effect
>
> sudo  mysql5 -u root -p password script.sql
>
> Can you help me please ?

Close, but try this:

sudo mysql5 -u root -p password < script.sql

-- 
Michael Parson
Unix Thug
Austin, TX
KF5LGQ


More information about the macports-users mailing list