import database - command line alternative

Can anyone tell me what the Unix command line alternative is to doing the UI operation:

Edit Databases > Import Database > DBNAME > Import Now

Many thanks!

the method I use is this.
I have a txt file which is generated by mysqldump (or is it myslhotdump), I forget and will need to check my notes at home.

then when I want to import it I do it thus:
cat db.txt | mysql -uname -ppassword

that takes the sql statements and drops them into mysql.

not sure if that is the format of what you are trying to do

No, I’m not referring to a MySQL database import, but a VirtualMin import. VirtualMin has its own notion of which databases are being managed by the client. There is a special menu that allows for VirtualMin to pick up heretofore-unmanaged databases:

Edit Databases > Import Database > DBNAME > Import Now

This doesn’t actually do any database operations as far as I know. It only exposes a database name to the VirtualMin web interface. Because I have some operations that create databases by script, I’m faced with the issue that I presently have to use the GUI to do the above operation before the user account can see and manage via VirtualMin the databases in question.

What I’m looking for is the Unix (Fedora 10) command line to do the equivalent of the above operation. Something like:

virtualmin --domain domain.name --name database-name --import

Thanks for trying to answer the question, though!

I’m not sure there is such a thing right now – though you’re welcome to file a Feature Request using the Support link above, and Jamie can look into adding that.

-Eric