Getting MySql to load a database from script

Hello,
I’m doing a PHP/MySql project for collage.

Ubuntu shows I have the server installed:

MySQL Server
MySQL database server (metapackage depending on the latest version)

I have the Terminal open and mysql up. But how do I feed in my script to create the databases?

Show database; comes up with

mysql> show databases;
±-------------------+
| Database |
±-------------------+
| information_schema |
| test |
±-------------------+
2 rows in set (0.00 sec)

And I have the scrip written (and residing in ‘My Project’) to load under var/www in my folder “My Project”.

So is there a command that will load it? We used '. xxx.sql" to load it in class but this is my server, not theirs!

Thanks

Deaf

Belay that folks!!! I got the workbench up, and using it loaded the databases. Then on the termanial did a show databases; and it all came up!

Also, on the var/www I changed the index.html to point to ‘My Project’ folder underneaith the var/www and the index on it shows up!

Now I will work on my problem… why when I try to change or insert it seems to lose all the data but it generates a index (it’s on AUTO_INCREMENT.)

Deaf

I think you would benefit from setting up phpmyadmin, to get visual sql management

Sponsor our Newsletter | Privacy Policy | Terms of Service