Web Hosting Talk







View Full Version : individual user can't create mysql db


SWDevil
11-03-2003, 11:00 PM
I was wondering if you guys can help me out.. I am working on another site somewhat similar to invisionfree.com where individuals can signup and receive free discussion board hosting and for this purpose, I plan to have seperate mysql db for each user.

Now the script that has been created to do this, is unable to create mysql db and for some reason even after logging into phpmyadmin via cpanel, I am not able to create mysql db's using phpmyadmin, however I am able to create db's using cpanel's mysql tab.

Now I was wondering if anyone can tell me how can I give this script an ability to create unique mysql db everytime a new user signup.

Thanks for the help.

NS

null
11-03-2003, 11:39 PM
I would NOT recommend you to use separate db for each user. There is just no need to do that.

You can create databases in Cpanel because it works under mySQL root; you can't create databases automatically with a Cpanel username and password.

null

palash
11-03-2003, 11:59 PM
it's really very unrealistic to open separate db for each free user! better use a single db and use table prefix like
"user_" will more helpfull and manageble in this senario.

null
11-04-2003, 12:37 AM
It's even much easier to use one table users ;)

Burhan
11-04-2003, 04:45 AM
I think what he means is that for each user he was considering using a different database for the forums that will be given.

Regardless, that's a bad idea. Use prefixes.

As for your original problem -- your user that phpmyadmin runs as doesn't have permissions to create databases.

You can change that by granting the phpmyadmin user the rights to create databases.

http://www.mysql.com/doc/en/GRANT.html

SWDevil
11-04-2003, 05:47 AM
hum.. I guess... I would be better off using 1 mysql db for all the forums.

Thanks a lot for all the help.

Need Scripts