Hi all!

I have developed my application in VB.NET that uses a mysql database. From my application, I can make mysql backups and restore them. When i take a backup, the result is a .sql file which is saved somewhere. But as usual, one can open that sql file with a text editor (like notepad++) and see everything, database structure (tables) and data stored in tables. One can also make changes to the data in this sql file and restore it to the mysql server and thereby, be able to change the database contents of a live mysql server.

Due to the nature of some of the information contained in the tables of this database, I would't like to give the normal user an opportunity to even discover what's on my database.

How can I achieve this? Is there a way of producing a file of other extension/type rather than .sql that can't be opened by text editors, but at the same time reserve the ability to restore the database?

Thanks for any input.

Recommended Answers

All 4 Replies

Can you not just restrict access to the folder holding your backups via user permissions on the OS?

commented: Ok, thank you. +2

Perhaps you could avoid telling users the name of the back-up folder and the file name, as well as restricting access to that folder. And place an index.html file in the folder with nothing in it, or saying something like silly like a link to the home page, so users cant see a file listing for the folder.

commented: Thank you drjohn for that trick! +2

sql files ARE text files. The only way to prevent people from reading them is to make sure they don't have access to whereever they're stored.

commented: Thank jwenting, I will work on that +2
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.