actually user the database_connect string for mysql.

This means you can run all the OpenSim grid services without
needing a mysql_connection.ini
0.6.0-stable
Sean Dague 2008-05-28 18:12:32 +00:00
parent 89c164fbc1
commit 11d83cb737
3 changed files with 20 additions and 28 deletions

View File

@ -29,5 +29,6 @@ namespace OpenSim.Data
{
public abstract class InventoryDataBase
{
public abstract void Initialise(string connect);
}
}

View File

@ -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");

View File

@ -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();
}
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");
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);
database =
new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling,
settingPort);
}
TestTables(database.Connection);
}