aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLGridData.cs
diff options
context:
space:
mode:
authorSean Dague2008-05-28 17:59:46 +0000
committerSean Dague2008-05-28 17:59:46 +0000
commit89c164fbc18e082bf2d036bd2167b824e90aebc1 (patch)
tree9042b06429cb3941b04f79af084c13d022d861e7 /OpenSim/Data/MySQL/MySQLGridData.cs
parent* Minor: Another small log adjustment (diff)
downloadopensim-SC_OLD-89c164fbc18e082bf2d036bd2167b824e90aebc1.zip
opensim-SC_OLD-89c164fbc18e082bf2d036bd2167b824e90aebc1.tar.gz
opensim-SC_OLD-89c164fbc18e082bf2d036bd2167b824e90aebc1.tar.bz2
opensim-SC_OLD-89c164fbc18e082bf2d036bd2167b824e90aebc1.tar.xz
let Grid Servers specify a connect string in their configuration.
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLGridData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLGridData.cs29
1 files changed, 17 insertions, 12 deletions
diff --git a/OpenSim/Data/MySQL/MySQLGridData.cs b/OpenSim/Data/MySQL/MySQLGridData.cs
index e830133..421c283 100644
--- a/OpenSim/Data/MySQL/MySQLGridData.cs
+++ b/OpenSim/Data/MySQL/MySQLGridData.cs
@@ -51,19 +51,24 @@ namespace OpenSim.Data.MySQL
51 /// <summary> 51 /// <summary>
52 /// Initialises the Grid Interface 52 /// Initialises the Grid Interface
53 /// </summary> 53 /// </summary>
54 override public void Initialise() 54 override public void Initialise(string connect)
55 { 55 {
56 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); 56 if (connect != String.Empty) {
57 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); 57 database = new MySQLManager(connect);
58 string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database"); 58 } else {
59 string settingUsername = GridDataMySqlFile.ParseFileReadValue("username"); 59 m_log.Warn("Using deprecated mysql_connection.ini. Please update database_connect in GridServer_Config.xml and we'll use that instead");
60 string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); 60 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
61 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling"); 61 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
62 string settingPort = GridDataMySqlFile.ParseFileReadValue("port"); 62 string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
63 63 string settingUsername = GridDataMySqlFile.ParseFileReadValue("username");
64 database = 64 string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
65 new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, 65 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
66 settingPort); 66 string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
67
68 database =
69 new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling,
70 settingPort);
71 }
67 72
68 TestTables(); 73 TestTables();
69 } 74 }