actually user the database_connect string for mysql.
This means you can run all the OpenSim grid services without needing a mysql_connection.ini0.6.0-stable
parent
89c164fbc1
commit
11d83cb737
|
@ -29,5 +29,6 @@ namespace OpenSim.Data
|
|||
{
|
||||
public abstract class InventoryDataBase
|
||||
{
|
||||
public abstract void Initialise(string connect);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,17 +48,9 @@ namespace OpenSim.Data.MSSQL
|
|||
/// </summary>
|
||||
private MSSQLManager database;
|
||||
|
||||
/// <summary>
|
||||
/// Loads and initialises this database plugin
|
||||
/// </summary>
|
||||
public void Initialise(string connect)
|
||||
{
|
||||
// TODO: actually use the provided connect string
|
||||
Initialise();
|
||||
}
|
||||
|
||||
public void Initialise()
|
||||
{
|
||||
IniFile GridDataMySqlFile = new IniFile("mssql_connection.ini");
|
||||
string settingDataSource = GridDataMySqlFile.ParseFileReadValue("data_source");
|
||||
string settingInitialCatalog = GridDataMySqlFile.ParseFileReadValue("initial_catalog");
|
||||
|
|
|
@ -48,28 +48,27 @@ namespace OpenSim.Data.MySQL
|
|||
/// </summary>
|
||||
private MySQLManager database;
|
||||
|
||||
/// <summary>
|
||||
/// Loads and initialises this database plugin
|
||||
/// </summary>
|
||||
public void Initialise(string connect)
|
||||
{
|
||||
// TODO: actually use the provided connect string
|
||||
Initialise();
|
||||
}
|
||||
|
||||
public void Initialise()
|
||||
{
|
||||
IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
|
||||
string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
|
||||
string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
|
||||
string settingUsername = GridDataMySqlFile.ParseFileReadValue("username");
|
||||
string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
|
||||
string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
|
||||
string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
|
||||
|
||||
database =
|
||||
new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling,
|
||||
settingPort);
|
||||
if(connect != String.Empty)
|
||||
{
|
||||
database = new MySQLManager(connect);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Warn("Reverting to deprecated mysql_connection.ini file for connection info");
|
||||
IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
|
||||
string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
|
||||
string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
|
||||
string settingUsername = GridDataMySqlFile.ParseFileReadValue("username");
|
||||
string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
|
||||
string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
|
||||
string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
|
||||
|
||||
database =
|
||||
new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling,
|
||||
settingPort);
|
||||
}
|
||||
TestTables(database.Connection);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue