create subdomains using command line

Hi

How can i create subdomains using command line?

I have to automate an automation, creating a subdomain, mysql db/ user … any ideias ?

Thanks in advance

Paulo

:frowning: … no answers …

ok … let me try a new aproach :wink:

i can create a domain account using the API …

how can i create a mysql db/ user db as part of the account ? giving permissions to that mysql db to be updated from outside world (not localhost), using command line …

help apreciated … please …:stuck_out_tongue:

Thanks

Paulo

Hi

The quick answer is you can’t create a mysql db and user using the api, however you can do it using mysql command
I’d create a text file with all the mysql commands (create database, create table, create user, grant, …) needs

then I’d do
mysql -u root -ppassword < textfile

pascal

Hi Pascal,

… but how to assign that db/user/etc… to the account ? (also permissons to be accessed from outside?)

Thanks

Paulo

maybe using some ~iworx/bin/… command ? any idea ?

Pascal is correct. You can’t create database users and passwords with the API. You will have to either create them in SiteWorx, or use MySQL statements to create users and set their permissions. Here’s a link that might help:

http://dev.mysql.com/doc/refman/4.1/en/grant.html

And similarly, you can not create a subdomain from the command line or the API.