sometimes i want to make information that is stored on the computer in a place specified by the user... here's a scenario:
A person downloads a mysql server, they say some information for it such as where to install it and such.
I need to do a similar thing and save information at a specified place that is accessable to the program at runtime without re-stating all the information.
I have 2 solutions:
1. Make environment variable { portability problem?, i go no clue how... }
2. Make the installation path firm.
How should i save information that is vital at program startup(for example where to find the info file, i just need to store the path where it is)
another problem i got is that I wanna give a shot at making a primitive server that uses folders as a database and files with special format(Which i will make) to be the tables.
The problem is that i wanna store password and username of the server somewhere... but my problem is that anyone can delete that file or personally encode a file using the algorithm im using and put that jibbrish into the file to change password. How do i make the file safe or what is the approach to that.
but my problem is that anyone can delete that file or personally encode a file using the algorithm im using and put that jibbrish into the file to change password. How do i make the file safe or what is the approach to that.
You need to rely on the filesystem security to keep unauthorized users out of that file then.
i just want to give a try to making my own primitive database.
It is a good 'connector' to many skills such as file i/o, server/client networking, high level string manipulation.
I already have a diagram... it's rather small to be honest.
The main problem I have is that I don't know how to protect the password file from being edited. Mysql installs on my computer and even though i go on admin account i'm not sure how to 'dumbly remove the password.'.
If you are relying totally on file system, then ultimately you have to store passwords into some time of files. You can encrypt passwords using cryptography, you can have your own file type/format. Its not easy for a general user to recover encrypted passwords.