Talk:Database Settings
From OpenSimulator
(Difference between revisions)
(→MySQL: using a Unix socket instead of a TCP socket is possible?...: new section) |
m (Added two more links...) |
||
Line 52: | Line 52: | ||
... and so forth. | ... and so forth. | ||
− | This also seems consistent with the report by [http://opensimulator.org/pipermail/opensim-users/2010-June/004845.html Greg Weber], made 10 years ago. | + | This also seems consistent with the report by [http://opensimulator.org/pipermail/opensim-users/2010-June/004845.html Greg Weber], made 10 years ago. I've also tried a few combinations, e.g. using the keyword 'Socket' to specify the socket (that keyword is not recognised) and a few more suggestions according to [https://www.connectionstrings.com/mysql/ this page]. |
− | + | ||
− | I've tried a few combinations, e.g. using the keyword 'Socket' to specify the socket (that keyword is not recognised) and a few more suggestions according to [https://www.connectionstrings.com/mysql/ this page]. | + | |
So, what's the trick? | So, what's the trick? | ||
[[User:Gwyneth Llewelyn|Gwyneth Llewelyn]] ([[User talk:Gwyneth Llewelyn|talk]]) 09:23, 9 June 2020 (PDT) | [[User:Gwyneth Llewelyn|Gwyneth Llewelyn]] ([[User talk:Gwyneth Llewelyn|talk]]) 09:23, 9 June 2020 (PDT) | ||
+ | |||
+ | :Ten years ago, it seemed to have worked with the simple trick of adding ''Mono.Posix.dll'' to the ''bin'' directory: [https://forums.osgrid.org/viewtopic.php?f=14&t=1003&start=10 OS Grid Forums] Some of the official Microsoft documentation also seems to imply that this way of connecting is possible: [https://dev.mysql.com/doc/dev/connector-net/8.0/html/P_MySql_Data_MySqlClient_MySqlConnection_ConnectionString.htm MySQL Connection String] -- [[User:Gwyneth Llewelyn|Gwyneth Llewelyn]] ([[User talk:Gwyneth Llewelyn|talk]]) 10:00, 9 June 2020 (PDT) |
Revision as of 09:00, 9 June 2020
MySQL: using a Unix socket instead of a TCP socket is possible?...
Hi!
For security reasons, I do not wish to launch MySQL/MariaDB with an open 3306 port — also, it saves some precious resources (every byte counts!).
These instructions claim that it's possible to use a Unix socket instead, by using 'Data Source=/path/to/socket;...' but this seems not to be the case:
17:13:04 - [FSASSETS]: Can't connect to database: Unable to connect to any of the specified MySQL hosts.
and later:
System.Reflection.TargetInvocationException: Exception has been thrown by the ta rget of an invocation. ---> MySql.Data.MySqlClient.MySqlException: Unable to con nect to any of the specified MySQL hosts. ---> System.Net.Sockets.SocketExceptio n: Could not resolve host '/var/run/mysqld/mysqld.sock' at System.Net.Dns.Error_11001 (System.String hostName) [0x00015] in <88f564ea6 9dd4dc8ba9bf979e48d5996>:0 at System.Net.Dns.GetHostByName (System.String hostName) [0x00021] in <88f564ea69dd4dc8ba9bf979e48d5996>:0 at System.Net.Dns.GetHostEntry (System.String hostNameOrAddress) [0x00052] in <88f564ea69dd4dc8ba9bf979e48d5996>:0 at MySql.Data.Common.MyNetworkStream.GetHostEntry (System.String hostname) [0x0000c] in <0004ab8b375b422f9000ac25a68089d9>:0 at MySql.Data.Common.MyNetworkStream.CreateStream (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings, System.Boolean unix) [0x00008] in <0004ab8b375b422f9000ac25a68089d9>:0 at MySql.Data.Common.StreamCreator.GetTcpStream (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) [0x00000] in <0004ab8b375b422f9000ac25a68089d9>:0 at MySql.Data.Common.StreamCreator.GetStream (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) [0x00021] in <0004ab8b375b422f9000ac25a68089d9>:0 at MySql.Data.MySqlClient.NativeDriver.Open () [0x00007] in <0004ab8b375b422f9000ac25a68089d9>:0 --- End of inner exception stack trace --- at MySql.Data.MySqlClient.NativeDriver.Open () [0x00041] in <0004ab8b375b422f9000ac25a68089d9>:0 at MySql.Data.MySqlClient.Driver.Open () [0x0000b] in <0004ab8b375b422f9000ac25a68089d9>:0 at MySql.Data.MySqlClient.Driver.Create (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) [0x0004e] in <0004ab8b375b422f9000ac25a68089d9>:0 at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection () [0x00000] in <0004ab8b375b422f9000ac25a68089d9>:0 at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection () [0x0008a] in <0004ab8b375b422f9000ac25a68089d9>:0 at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver () [0x0003f] in <0004ab8b375b422f9000ac25a68089d9>:0 at MySql.Data.MySqlClient.MySqlPool.GetConnection () [0x0001c] in <0004ab8b375b422f9000ac25a68089d9>:0 at MySql.Data.MySqlClient.MySqlConnection.Open () [0x0016d] in <0004ab8b375b422f9000ac25a68089d9>:0 at OpenSim.Data.MySQL.MySQLAssetData.Initialise (System.String connect) [0x00013] in <e8223c686f534fcfbb8f82618e6d0c9d>:0 at OpenSim.Services.AssetService.AssetServiceBase..ctor (Nini.Config.IConfigSource config, System.String configName) [0x000ef] in <13354e9a2d8f4ffbbbe91addeaa7bcc4>:0 at OpenSim.Services.AssetService.AssetService..ctor (Nini.Config.IConfigSource config, System.String configName) [0x00000] in <13354e9a2d8f4ffbbbe91addeaa7bcc4>:0 at OpenSim.Services.AssetService.AssetService..ctor (Nini.Config.IConfigSource config) [0x00000] in <13354e9a2d8f4ffbbbe91addeaa7bcc4>:0 at (wrapper managed-to-native) System.Reflection.RuntimeConstructorInfo.InternalInvoke(System.Reflection.RuntimeConstructorInfo,object,object[],System.Exception&) at System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x00005] in <f2b3ab7dfff746f594d2ef5b16ec3c90>:0 --- End of inner exception stack trace --- at System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x0001a] in <f2b3ab7dfff746f594d2ef5b16ec3c90>:0 at System.Reflection.RuntimeConstructorInfo.DoInvoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x7fa9f8226fc0 + 0x000c8> in <f2b3ab7dfff746f594d2ef5b16ec3c90>:0 at System.Reflection.RuntimeConstructorInfo.Invoke (System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x7fa9f8227140 + 0x0001f> in <f2b3ab7dfff746f594d2ef5b16ec3c90>:0 at System.RuntimeType.CreateInstanceImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) [0x0022b] in <f2b3ab7dfff746f594d2ef5b16ec3c90>:0 at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) <0x7fa9f8058380 + 0x0013a> in <f2b3ab7dfff746f594d2ef5b16ec3c90>:0 at System.Activator.CreateInstance (System.Type type, System.Object[] args) <0x7fa9f8058560 + 0x00022> in <f2b3ab7dfff746f594d2ef5b16ec3c90>:0 at OpenSim.Services.Base.ServiceBase.LoadPlugin[T] (System.String dllName, System.String className, System.Object[] args) [0x00066] in <9f09c2e64286470d8fa2cd78e2dbf52f>:0 17:13:04 - [FSASSETS]: Failed to load fallback service
... and so forth.
This also seems consistent with the report by Greg Weber, made 10 years ago. I've also tried a few combinations, e.g. using the keyword 'Socket' to specify the socket (that keyword is not recognised) and a few more suggestions according to this page.
So, what's the trick?
Gwyneth Llewelyn (talk) 09:23, 9 June 2020 (PDT)
- Ten years ago, it seemed to have worked with the simple trick of adding Mono.Posix.dll to the bin directory: OS Grid Forums Some of the official Microsoft documentation also seems to imply that this way of connecting is possible: MySQL Connection String -- Gwyneth Llewelyn (talk) 10:00, 9 June 2020 (PDT)