hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Web Hosting : Cpanel Mysql Databases
Reply

Web Hosting Discussions on all aspects of web hosting including past experiences (both negative and positive), choosing a host, questions and answers, and other related subjects. If your service is unavailable, please click here.
Forum Jump

Cpanel Mysql Databases

Reply Post New Thread In Web Hosting Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 08-13-2004, 11:13 PM
|k_m_k_z!| |k_m_k_z!| is offline
New Member
 
Join Date: Aug 2003
Posts: 2

Cpanel Mysql Databases


Hi,

I'm trying to create a program that would accept the purchase of a website, copy all the files to a user-specified directory, create a database and user, and write the required information to the config.php file. The problem I'm having is that I'm using cPanel on my site, and I cannot create databases or users without going through it. I already tried to GET/POST hack but it requires the user to 1. create the user, 2. create the DB, and 3. to link the DB and user. Since PHP is serverside and it can't send variables without actually GOING to the page, I can't figure out how to create the DBs and users without logging into cPanel. I also tried to login to MySQL and use CREATE and USE to fill in the DB and table info, but my hosting provider made it impossible to do that by taking away the permissions.

Any clues?

Thank you so much,

KMKZ

Reply With Quote


Sponsored Links
  #2  
Old 08-14-2004, 12:37 AM
PMH-Steve PMH-Steve is offline
Disabled
 
Join Date: Jul 2004
Location: Allentown, PA
Posts: 97
What type of account do you have? For this type of thing you are going to need either root access or a reseller account that allows you to setup a remote access key for WHM.

If you get root access or a reseller account with the remote key feature enabled you can use it to issue commands from a PHP script to create the accounts and so forth.

The issue with needing to actually log into cPanel will be taken care of by that remote access key. Then to fix the "actually having to go to the page problem" you can use something like the snoopy class for PHP (http://snoopy.sourceforge.net/) to issue commands to to WHM behind the scenes, which is really very easy to do.

If you search these forums for "PHP snoopy" you will find some info on this.

If you already now all this then sorry I misunderstood your post.

Reply With Quote
  #3  
Old 08-14-2004, 12:47 AM
|k_m_k_z!| |k_m_k_z!| is offline
New Member
 
Join Date: Aug 2003
Posts: 2
Well, yes, you somewhat misunderstood my post, but this Snoopy thing is very interesting... I think I'll check it out.

What I really wanted to know is how I can have a PHP script setup a MySQL user, database, and then assign the user priviliges on that database. After it is created, the PHP script would write the info to another file, so it could access the database (this I know how to do).

I have a regular account with the WHM and cPanel x2... I just wish I could use my main MySQL account to create DB's and users, but my hosting provider wont let me...

Thanks for your help...

KMKZ

Reply With Quote
Sponsored Links
  #4  
Old 08-14-2004, 03:28 AM
overulehost overulehost is offline
Disabled
 
Join Date: Jan 2004
Posts: 323
yeah, to create accounts,etc you need the access key from whm.....
Well why code yourself when you can get great software like whmautopilot
Check them out

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Web Hosting Control Panel cPanel and WHM Version 11.32 Adds Features, Fixes Web Hosting News 2012-04-08 11:51:35
cPanel Launches Version 11.32 of Control Panel and Web Host Manager Web Hosting News 2012-02-15 12:46:33
Web Host Rackspace Launches Private Beta for MySQL Cloud Database Web Hosting News 2011-12-01 21:09:51
cPanel Offers Windows Hosting Control Panel Enkompass for Free Web Hosting News 2011-10-13 17:14:16
cPanel to Launch Certification Program at cPanel Conference 2011 Web Hosting News 2011-09-21 18:15:42


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?