简体   繁体   中英

How can I give users access to MySQL database securely without showing them my database credentials

Customers download front end source code from my website which contains database access on my server. I don't want to incldue the config.php file in the download so have used:

<?php include("http://www.othersite.com/config.php"); ?>

Is there a more secure or more efficient way (as users have to enable allow_remote_url in their php.ini currently) of providing users access?

How about creating users in mysql for each customer, then give them access to one database only? Or provide an api which can access the database?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM