Portal Home > Knowledgebase > Articles Database > HELP Implement Cluster Remote Access into PHP?
HELP Implement Cluster Remote Access into PHP?
Posted by Alex LD, 07-30-2010, 01:53 PM |
First off I have a dedicated Server.
I'm trying to get a php script to create a database on my cPanel/WHM ran server.
My programmer wants that to do it, but i know that that is not allowed on many servers including mine because its a security risk.
I'm trying to tell him to try Cluster remote access key and use that, but neither of us know how to implement that into the PHP code to create it,
Would this work? Are there any other alternatives.
|
Posted by Steve_Arm, 07-30-2010, 01:56 PM |
The code you are posting what will do is connect to an mysql server. You are talking
about creating a database. I am confused.
|
Posted by Alex LD, 07-30-2010, 02:11 PM |
The creating a database we can do,
but its having troubles having access to the server to do so, which is why I wanted to have an alternative method of doing so via whm remote access key
|
Posted by mattle, 07-30-2010, 03:53 PM |
You'll need to connect as a user who has CREATE permissions granted. You do not want to grant these permissions to your normal web database user. You should create a whole separate user in MySQL for this.
I have no idea what a "whm remote access key" is, but there's no reason that this can't be done securely using MySQL's built-in permissions tables and a standard connection. If you're really worried, you can also tunnel the connection via SSH to encrypt the connection info in transit.
|
Posted by Alex LD, 07-30-2010, 05:58 PM |
Well we've obviously assigned a user who can do all the permissions, but its not a root MySQL user? so I think that could also be whats limiting it from doing so.
|
Posted by stuarts, 11-10-2010, 12:31 AM |
If you are trying to get a PHP script to create a database on your Cpanel then you require connecting as a user who has CREATE permissions granted.
|
Add to Favourites Print this Article
Also Read