Web Hosting Talk







View Full Version : MySql Auto Install


JackalJake
08-15-2005, 03:17 PM
I have a linux reseller account that uses cpanel.

I am in the middle of creating a web application that I would like all of my customers to have. It's a php-based script that I can put into the skeleton directory and have it automatically created in each user's account.

The problem is that it uses a mysql db which requires going into the cpanel and creating the name of the database, a user, and assigning privledges to the database for the user.

I guess the question is, is there anyway to automatically setup a database in mysql, maybe through a php/cron or even a web interface type app, kind of like fantastico does?

Azavia
08-15-2005, 03:30 PM
hi,

No, the privileges for your user will not allow you to create databases. what you can do is use something like CURL to log into CPanel, create the db, user, and add the user to the DB.

Dashbox
08-16-2005, 07:41 AM
Also, you could write to a flat file for each customer, and then write a script that you could CRON to export the flat-file data into a MySQL Database.

JackalJake
08-16-2005, 04:48 PM
yea.....I was afraid I couldn't.

I used to have all my customers working off the same database, but the database was getting big and slowing down the process, so I decided it was time to break it down into a standalone app.

So let me ask you this, would I be able to do something like that if I owned my own box instead of having a reseller account?

I'm not too knowledgeable about managing my own server, so I wouldn't do anything until I was ready, but I was just wondering if it was possible.

masfenix
08-16-2005, 05:41 PM
Well, You 'd still need to use CRUL