|
#1
|
|||
|
|||
|
Hello,
my question is easy... I have a user (admin) in my website, and i have several MySql Databases. I want to give access to this user to "one" of this databases, but not to the others. Can I install a web-based script writen in PHP to give access only to this DB in my server? I don't want to give him the admin login and password to my cpanel, only a access to modify the database... Thanks |
|
#2
|
||||
|
||||
|
Not only can you restrict access for a user to a specific database, you can also restrict the operations this user is allowed to perform on the database, and the hosts that they are allowed to connect from.
To allow someone access to a specific database, go to cPanel -> MySQL Databases and create a new database user. Once this is ready, locate the two drop down menus that allow you to grant specific privileges to the user, for the database. The form is self-explanatory, so I will not go into details. You can read more on this here: http://www.cpanel.net/docs/cpanel/ To allow your database users to remotely connect to your databases, add the remote IP on the Allowed Hosts list, or simply add '%'. The latter is not very secure though, since connections to the database will be allowed from any host.
__________________
Pick a different route. |
|
#3
|
|||
|
|||
|
Ok, perfect. but...
Can i install a, p.e. PHPMYADMIN or other similar software in a subdomain in my site to give access to my user? Something similar to this: phpmyadmin.domain.com... Thanks |
|
#4
|
||||
|
||||
|
Sure, you can do this. This phpMyAdmin installation will be more limited in terms of funcionality (max execution time is set to 30 seconds for the php that apache uses).
Also, make sure you DO NOT put any login credentials for MySQL in the configuration file. Have your user log in every time
__________________
Pick a different route. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|