English (United Kingdom)
Jms Multi Site, formerly joomla multisite.
Create, share multiple joomla sites in few clicks !
Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View e-Privacy Directive Documents

Welcome, Guest
Please Login or Register.    Lost Password?

Can multisites auto create a new database via SSH?
(1 viewing) (1) Guest
Go to bottomPage: 123
TOPIC: Can multisites auto create a new database via SSH?
#8604
Re: Can multisites auto create a new database via SSH? 12 Years, 5 Months ago Karma: 0
I was actually thinking it could be done via the new Joomla CLi functionality.

I'm not a developer or database guru but I went to a Joomla Day and saw a presentation about Joomla's new command prompt function to interface with multiple database systems etc.

Do you know much about this?

If this is going to be a long and expensive process perhaps I should just move hosting providers. You mention Godaddy in some of your presentations. Do you know if these JMS Multisites features are compatible with Godaddy?
TonyGee
Expert Boarder
Posts: 113
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#8611
Re: Can multisites auto create a new database via SSH? 12 Years, 5 Months ago Karma: 54
I don't know what you make reference concerning the Joomal CLi functionality or joomla's new command prompt.

Concerning the compatibility with Godaddy, JMS works perfectly on linux delux plan or unlimited plan or similar.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#8619
Re: Can multisites auto create a new database via SSH? 12 Years, 5 Months ago Karma: 0
Thanks for letting me know what Godaddy plans to select.

My host is going to try and organise me access to Super User for MySQL. They have asked me a couple questions which I'm confident to answer but thought I would just double check with you:

1) Will we be modifying the apache config to add virtualhosts? - I don't believe this is relevant for us... is this true?

2) Can the software create databases and database usernames using a prefix like 'slveg_' ? - I do think this is possible but please correct me if I'm wrong.

Thanks again for your advice on this.

UPDATE: My hosting provider has created a new User Account for me that can create/delete/set permissions for users and databases outside of the control panel.

The only restriction is that I need to create new databases and database users with a prefix 'slveg_' (e.g 'slveg_{databasename}')

In the instructions it says I need to leave the 'New Database Name' and 'New Database User' info blank for the multisites.cfg.php file to create the database and user dynamically.

Please let me know how I can setup the template or PHP file to include the required prefix?

Thanks and regards.
TonyGee
Expert Boarder
Posts: 113
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2011/11/30 01:19 By TonyGee.
The administrator has disabled public write access.
 
#8630
Re: Can multisites auto create a new database via SSH? 12 Years, 5 Months ago Karma: 54
1) Yes this is not relevant for JMS.
The only thing that must be know by JMS is the document root directory and the domain name (ServerName and ServerAlias)

2) Yes.
You need MySQL root privileges to create DB dynamically.

Remark: the keyword {databasename} does not exits in JMS.

If the MySQL user name that you provide to create the website does not exists or does nto have the privileges to create the DB or create the user then the multisites.cfg.php configuration ROOT info are used.

So you have to setup the "multisites.cfg.php" with the root login and password information. You perhaps may also need to setup the MySQL host name.

The new DB name can be computed like = slveg_{site_prefix}
DB User name could be the same = slveg_{site_prefix}
DB Password could be a random value like = {rnd_psw}
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#8640
Re: Can multisites auto create a new database via SSH? 12 Years, 5 Months ago Karma: 0
Hi Edwin,

I'm almost able to get this to work. I have successfully created new databases however I'm having issues creating the new database user.

This is what I've done:

In the multisites.cfg.php file:

define( 'MULTISITES_DB_GRANT_HOST', 'localhost');
define( 'MULTISITES_DB_ROOT_USER', 'super-user-name');
define( 'MULTISITES_DB_ROOT_PSW', 'super-user-password');

Then in the template config:

New DB server: localhost
New DB Name: slveg_{site_id}
New DB User: slveg_{site_id}
New DB Password: {rnd_psw}

Here is the error message I get:

Create User error [1044]: Query = [GRANT ALL PRIVILEGES ON `slveg_testdb5`.* TO `slveg_testdb5`@`199.##.###.##` IDENTIFIED BY '-:WYLUOS' WITH GRANT OPTION;], DB Message = [Access denied for user 'slveg_master'@'localhost' to database 'slveg_testdb5' SQL=GRANT ALL PRIVILEGES ON `slveg_testdb5`.* TO `slveg_testdb5`@`199.##.###.##` IDENTIFIED BY '-:WYLUOS' WITH GRANT OPTION;]

Can you recommend what has gone wrong here? I've asked my host to double check the super user premissions.

Thanks and regards.
TonyGee
Expert Boarder
Posts: 113
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#8646
Re: Can multisites auto create a new database via SSH? 12 Years, 5 Months ago Karma: 54
If I translate correctly the MySQL error message, you are trying to access the "slveg_testdb5" with the user "slveg_master'@'localhost'" that does not has the permission

So you have to cross-check all the parameters.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 123
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla