简体   繁体   中英

Mysql database backup sql file security?

I have a PHP script to backup a database as dbName.sql which can be accessible by anyone. I need to encrypt/decrypt the backup database to be accessible only in my application. How can I do this?

Note: I have a list page to download all database backups. I want my server to be able to use the database only.

When you backup the file, move it to a location that can not be accessed by anyone in the root directory of the server. So for example, if you're public directory is public_html, move the file to be outside (or same level) as the public_html file.

Then the only two ways to access it is either by your script (with the proper calls) or via an FTP client.

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