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?
Go to bottomPage: 12
TOPIC: Is it possible to let JMSM create DB?
#9637
Is it possible to let JMSM create DB? 12 Years, 1 Month ago Karma: 0
Hi,

I'm new to JMS Multisite, and have bought the component as I need an easy way to implement 30+ sites for a chain of stores I represent.

In our scenario we need to have all sites on same domain, but located in a separate subdirectory like this:

domain.com/store1
domain.com/store2
.....
.....
Also - we wich to have each site (store) placed in its own database, but wuld like to share the files for easy updates of Joomla.

We have trawled through documentation and videos but have not yet found a way to create a template which automatically creates the database for us. Every time I create a new slave, we need to have created the database first, and then submit the credentials during the creation of the slave.

We would like JMS Multisite to create databases named like this:

shop_store1
shop_store2
....
....

and if nessecary it's OK for us, to use same MySQL user and pwd for all databases.

We got the copying/symlinking of files working preyyt OK - but need a way to fix the database problem.

Could someone please say how to make the template provide this, or perhaps refer us to a description on how to do this?

Cheers,
Zorroson
zorroson
Fresh Boarder
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#9638
Re:Is it possible to let JMSM create DB? 12 Years, 1 Month ago Karma: 0
Forgot to mention, that we have allready given master sites MySQL user rights in MySQL, so that user has rights to create new DB and tables etc.

And also - all work will be done in backend, so no frontend creation of slaves will take place. We just need an admin to have a easy way to create new sites based on master, from the backend!

Everything takes place on a Linux server and is based on Joomla 2.5.x.

/Zorroson
zorroson
Fresh Boarder
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2012/03/14 12:59 By zorroson.
The administrator has disabled public write access.
 
#9640
Re:Is it possible to let JMSM create DB? 12 Years, 1 Month ago Karma: 0
Just an update to the above....

We now get to a point, where our new database "shop_store1" is actually created as well as a new MySQL user - but then the creation of the slave halts with the following message:

500 - An error has occurred.

JDatabase::getInstance: Could not connect to database
joomla.library:2 - Could not connect to MySQL.

Return to Control Panel


Looking in phpMyadmin I can see the user shop_store1 is created with all priviledges on the database, but hostfield is set to my linux servers ip, instead of localhost. Not sure if this matters? Or if it can be changed so the JMS Multisite creates the user with hostfield set to "localhost"?

Hope someone can help..

Cheers,
Zorroson
zorroson
Fresh Boarder
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2012/03/14 13:55 By zorroson.
The administrator has disabled public write access.
 
#9649
Re:Is it possible to let JMSM create DB? 12 Years, 1 Month ago Karma: 54
If you successfully created the DB and that a MySQL User is also dynamically created and attached to this DB then the possible reason of the "could not connect to DB" is perhaps related to the password. If you generated the password automatically {rnd_psw} perhaps you got specific characters that had not been recorded correctly.

Try to use an Alpha Numberic password without special characters.

What happening when the website is created from the front-end.
Can you go back in the back-end and open/resave with success or did you get again a "could not connect to DB" ?

Verify also that the MySQL user has the access to the DB.

Check the MySQL user permission with the PHPMyAdmin / privileges menu. You need to be root to acces the "privileges" menu.

As you seems using cPanel and I hope WHM, here it is some advice that may help you.

Open you cPanel account.
Go in the MySQL database management.
Create a new MySQL "root" user that you will attach to your account.
By default a cPanel account does NOT have a root MySQL user.
(ie account_root)

Go in WHM with root login and open the PHPMyAdmin
Open the privileges menu
Select the "account_root" user and modify its privileges.
Select ALL privileges and add a grant to "account\_\%" to give root access to all DBs of your account.

After that you can modify the "multisites.cfg.php" files present in the "/adminsitrator/component/com_multisites" to setup the DB "root" info.
host = "localhost"
User = "account_root"
Psw = the password that you have setup in cPanel when you created the "account_root"

This would create automatically the DB and the MySQL users.

Remark: the DBs and users created are not displayed in the cPanel account but can be saw with your PHPMyAdmin with root login.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
Last Edit: 2012/03/15 14:55 By edwin2win.
The administrator has disabled public write access.
 
#9651
Re:Is it possible to let JMSM create DB? 12 Years, 1 Month ago Karma: 0
Hi Edwin,

Thanx for taking the time to help me out!

The password being used only consistes of letters and number - so I don't think thats the issue.

Also the MySQL user being used, have (for testing purposes) got all Privileges globally - effectively a clone of root. And I can log in to phpMyadmin with the user, and see and do everything in there...

I have not tried creating website from frontend - not even sure how to do this, but I will try and the get back with more info on this

Cheers,
Zorroson
zorroson
Fresh Boarder
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#9655
Re:Is it possible to let JMSM create DB? 12 Years, 1 Month ago Karma: 54
Do you use the latest JMS version ?
If not, I suggest that you retry with the latest version of JMS 1.2.79

See FAQ for the procedure to get the latest version
www.jms2win.com/en/faq/faq-joomla-multi-sites#cat-122
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: 12
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla