Mobile app version of vmapp.org
Login or Join
Eichhorn148

: Allow Link access to only one database I have a hosting account where we have multiple domains hosted and many of them have their own database. Coming to question, Can I share access to

@Eichhorn148

Posted in: #Database #Phpmyadmin #WebHosting

I have a hosting account where we have multiple domains hosted and many of them have their own database.

Coming to question, Can I share access to particular database on phpmyadmin to a person who can login and edit database according to what he want, without letting him access to my other database and my hosting account.

I don't want to share hosting user and password. Help me how to overcome this problem.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Eichhorn148

3 Comments

Sorted by latest first Latest Oldest Best

 

@Rambettina238

PHPMyAdmin is a general MySQL client program. It prompts for a username and password which are used to access the database server directly. i.e. the database credentials and the credentials you enter into PHPMyAdmin are the same.

To achieve what you want, create a new user for the database server and grant them privileges only on the database you want them to have access to.

For example:

CREATE USER 'myguest'@'localhost' IDENTIFIED BY 'theirpass';
GRANT ALL ON theirdatabase.* TO 'myguest'@'localhost';


This does require that you have sufficient access to create new users in your database. That is unlikely to be the case if you have a shared hosting account (in which case you are out of luck).

10% popularity Vote Up Vote Down


 

@Shanna517

My Opinion



I'm pretty sure you can add phpMyAdmin or search for another admin interface which has access to use specified commands in your
databases by creating it in your website directory.



Example

I've made something similar when I had a game server where the admins could add/remove credits, items and others from users accounts, so you can create a similar system for your needs, it's also a better solution for your security when an admin can edit certain tables and rows and not drop all your tables.

What you should be aware of

Altought if you are going for such a solution you have to password protect it and be aware of XSS attacks and other injections in it because it can be sloppy especially if you use admin interface from the internet and not going for a custom one, people put shells in this features in at least 40% of the cases.

The easy way to go for it

phpMyAdmin is a trusted feature, you can add it in your website directory and only share the user and password for the current site with your staff members, I recommend using custom solution because everybody having access to phpMyAdmin can also drop tables, modify rows etc..

10% popularity Vote Up Vote Down


 

@Eichhorn148

i'm not sure, that you have such privileges, but your hoster has them 100%. To achieve what you want, In your hosting account should be created another one user, and he gets an access only to the database you allow. If you are able to create a user - do it, if not, ask your hoster.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme