Displaying 1 result from an estimated 1 matches for "hostname_or_ip".
2007 Mar 27
1
Reading config data from text files
...ing a tcl/tk gui tool to wrap around RMySQL for some co-workers.
One function is to be able to add, modify, and remove entries to my.cnf, which is where RMySQL stores database connection information in the following format:
[connection_name]
# comment
user = $username
password = $password
host = $hostname_or_ip
database = $which_database_to_use
I'm seeking advice as to a good way to read and write to this file.
Since I'm assuming that I will control the format of the entries via the interface I provide to the users, I could simply use scan() to read the contents of my.cnf into a list and then pe...