aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL
diff options
context:
space:
mode:
authorSean Dague2008-05-28 18:12:32 +0000
committerSean Dague2008-05-28 18:12:32 +0000
commit11d83cb737ebb12a3e6ae6c63551a0d010b90211 (patch)
treedf8ea9fc80ba896fb528a5fc2af5d94d97f361e6 /OpenSim/Data/MySQL
parentlet Grid Servers specify a connect string in their configuration. (diff)
downloadopensim-SC_OLD-11d83cb737ebb12a3e6ae6c63551a0d010b90211.zip
opensim-SC_OLD-11d83cb737ebb12a3e6ae6c63551a0d010b90211.tar.gz
opensim-SC_OLD-11d83cb737ebb12a3e6ae6c63551a0d010b90211.tar.bz2
opensim-SC_OLD-11d83cb737ebb12a3e6ae6c63551a0d010b90211.tar.xz
actually user the database_connect string for mysql.
This means you can run all the OpenSim grid services without needing a mysql_connection.ini
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r--OpenSim/Data/MySQL/MySQLInventoryData.cs39
1 files changed, 19 insertions, 20 deletions
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs
index 92b005d..74afe4f 100644
--- a/OpenSim/Data/MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs
@@ -48,28 +48,27 @@ namespace OpenSim.Data.MySQL
48 /// </summary> 48 /// </summary>
49 private MySQLManager database; 49 private MySQLManager database;
50 50
51 /// <summary>
52 /// Loads and initialises this database plugin
53 /// </summary>
54 public void Initialise(string connect) 51 public void Initialise(string connect)
55 { 52 {
56 // TODO: actually use the provided connect string 53 if(connect != String.Empty)
57 Initialise(); 54 {
58 } 55 database = new MySQLManager(connect);
59 56 }
60 public void Initialise() 57 else
61 { 58 {
62 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); 59 m_log.Warn("Reverting to deprecated mysql_connection.ini file for connection info");
63 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); 60 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
64 string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database"); 61 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
65 string settingUsername = GridDataMySqlFile.ParseFileReadValue("username"); 62 string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
66 string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); 63 string settingUsername = GridDataMySqlFile.ParseFileReadValue("username");
67 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling"); 64 string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
68 string settingPort = GridDataMySqlFile.ParseFileReadValue("port"); 65 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
69 66 string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
70 database = 67
71 new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, 68 database =
72 settingPort); 69 new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling,
70 settingPort);
71 }
73 TestTables(database.Connection); 72 TestTables(database.Connection);
74 } 73 }
75 74