Simple database creator
|Assignee:||Steve Kemp||% Done:|
A typical usage scenario for Symbiosis is a user creating a new site, then uploading a PHP webapp and expecting it to work.
The problem is, once they've uploaded the PHP content, they need to create a MySQL database, which can only currently be done over the command-line or PHPMyadmin.
An interesting feature would allow a user to create a "database" file in the /srv/domain.tld/config directory, containing a user and password. Symbiosis would detect the presence of this file, and if a database named after the domain didn't already exist, would create a new database, and GRANT the right permissions to it allowing local access with the username/password in the file. The user could then install say, Wordpress with only SFTP.
#3 Updated by Steve Kemp over 4 years ago
Yeah that's sensible enough. I'd aim to create
@common/lib/symbiosis/databases.rb@ with some utilities for:
- creating a database.
- testing a database exists.
- deleting a database.
Then add a simple script to look for
@/srv/*/config/databases/*@ - for each one:
- if it doesn't exist
- the create.
- do nothing.