PDA

View Full Version : create subdomains using command line


paulo
06-28-2007, 11:20 AM
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

paulo
07-03-2007, 05:23 PM
:-( ... no answers ...

ok ... let me try a new aproach ;-)

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 ....:p

Thanks

Paulo

pascal
07-04-2007, 04:34 AM
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

paulo
07-04-2007, 04:48 AM
Hi Pascal,

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

Thanks

Paulo

paulo
07-06-2007, 09:49 PM
maybe using some ~iworx/bin/.... command ? any idea ?

IWorx-Socheat
07-06-2007, 10:09 PM
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.