Thanks, again. The can-not-connect-to-server page was especially helpful. It turned out that I had to add a line to /etc/hosts.allow to permit TCP connections to mysqld even from localhost.
What confused me was $ mysql --host=localhost --port=... was working and *seemed* to be making its connection through TCP, on the specified port, but was actually using a Unix socket instead. If you specify --host=localhost (or omit host altogether), it does that. On the other hand, in the opensim config files, "server=localhost" in the connection string *does* force it to use TCP. In fact it seems impossible to configure opensim to use a Unix socket. Greg On 2010-Jun-28, Marck wrote: > I don't really have an idea how to help you with this, I am afraid. > > My impression is that this is not a problem with OpenSim but there is an > issue with the network connection to the MySQL server. Maybe MySQL is > configured differently for the mysql client and other generic clients (check > the [mysql] and [client] sections in your system's my.cnf for differences)? > > Perhaps the info at > http://dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server.html > (including the comments at the bottom of that page) can help you. In > particular, the parameters skip-networking and bind-address may be important > in this context. > > > Marck > > > [email protected] wrote: > >Thanks, that was partly helpful; I had completely forgotten about > >OpenSim.ini -- I thought all the config files were in config-include! > > > >But now that I have remedied that deficiency, I'm still having > >connect problems; in fact it looks like the same problems. > > > >I now have: > > > >A. in OpenSim.ini: > > > >[Startup] > > > >... > > > > storage_plugin="OpenSim.Data.MySQL.dll" > > storage_connection_string = "Data Source=localhost;Database=opensim;User > > ID=opensimulator;Password=secretish;" > > > > > >... > > > >[StandAlone] > > > >... > > > > inventory_plugin = "OpenSim.Data.MySQL.dll" > > inventory_source = "Data Source=localhost;Database=opensim;User > > ID=opensimulator;Password=secretish;" > > > >... > > > > userDatabase_plugin = "OpenSim.Data.MySQL.dll" > > user_source = "Data Source=localhost;Database=opensim;User > > ID=opensimulator;Password=secretish;" > > > >B. in config-include/StandaloneCommon.ini: > > > >[DatabaseService] > > ; > > ;### Choose the DB > > ; > > > > ; MySql > > StorageProvider = "OpenSim.Data.MySQL.dll" > > ConnectionString = "Data Source=localhost;Database=opensim;User > > ID=opensimulator;Password=secretish;" > > > >... > > > >Now, I have recently figured out where the OpenSim log file is, > >and here is the bottom of OpenSim.log (there is a little more detail here > >than usual, because I have inserted some additional logging statements > >in the code): > > > > > >2010-06-27 20:39:25,982 INFO - OpenSim.Application [OPENSIM MAIN]: > >configured log4net using default OpenSim.exe.config > >2010-06-27 20:39:26,029 INFO - OpenSim.Application [OPENSIM MAIN]: Runtime > >gave us 30 worker threads and 16 IOCP threads > >2010-06-27 20:39:26,037 INFO - OpenSim.Application [OPENSIM MAIN]: Bumping > >up to 500 worker threads and 1000 IOCP threads > >2010-06-27 20:39:26,038 INFO - OpenSim.Application Performing compatibility > >checks... > >2010-06-27 20:39:26,074 INFO - OpenSim.Application Environment is > >compatible. > > > >2010-06-27 20:39:26,248 INFO - OpenSim.ConfigurationLoader [CONFIG] Reading > >configuration settings > >2010-06-27 20:39:26,250 INFO - OpenSim.ConfigurationLoader [CONFIG] Reading > >configuration file /home/gdweber/build/opensim-0.6.9-source/bin/OpenSim.ini > >2010-06-27 20:39:26,295 INFO - OpenSim.ConfigurationLoader [CONFIG] Reading > >configuration file > >/home/gdweber/build/opensim-0.6.9-source/bin/config-include/Standalone.ini > >2010-06-27 20:39:26,302 INFO - OpenSim.ConfigurationLoader [CONFIG] Reading > >configuration file > >/home/gdweber/build/opensim-0.6.9-source/bin/config-include/StandaloneCommon.ini > >2010-06-27 20:39:26,316 INFO - OpenSim.ConfigurationLoader [CONFIG] > >StorageDll = OpenSim.Data.MySQL.dll > >2010-06-27 20:39:26,316 INFO - OpenSim.ConfigurationLoader [CONFIG] > >StorageConnectionString = Data Source=localhost;Database=opensim;User > >ID=opensimulator;Password=secretish; > >2010-06-27 20:39:26,316 INFO - OpenSim.ConfigurationLoader [CONFIG] > >EstateConnectionString = Data Source=localhost;Database=opensim;User > >ID=opensimulator;Password=secretish; > >2010-06-27 20:39:26,316 INFO - OpenSim.ConfigurationLoader [CONFIG] > >StandaloneInventorySource = Data Source=localhost;Database=opensim;User > >ID=opensimulator;Password=secretish; > >2010-06-27 20:39:26,316 INFO - OpenSim.ConfigurationLoader [CONFIG] > >StandaloneUserSource = Data Source=localhost;Database=opensim;User > >ID=opensimulator;Password=secretish; > >2010-06-27 20:39:26,316 INFO - OpenSim.ConfigurationLoader [CONFIG] > >ConfigurationLoader.cs updated 2010 June 27 19:55 > >2010-06-27 20:39:26,319 INFO - OpenSim.OpenSim [LOGGING]: Logging started > >to file /home/gdweber/build/opensim-0.6.9-source/bin/OpenSim.log > >2010-06-27 20:39:26,339 INFO - OpenSim.OpenSim [OPENSIM MAIN]: Using > >async_call_method SmartThreadPool > >2010-06-27 20:39:26,339 INFO - OpenSim.Framework.Servers.BaseOpenSimServer > >[STARTUP]: Beginning startup processing > >2010-06-27 20:39:26,340 INFO - OpenSim.Framework.Servers.BaseOpenSimServer > >[STARTUP]: Version: OpenSim 0.6.9 (Release) > > > >2010-06-27 20:39:26,349 INFO - OpenSim.OpenSim > >==================================================================== > >2010-06-27 20:39:26,349 INFO - OpenSim.OpenSim ========================= > >STARTING OPENSIM ========================= > >2010-06-27 20:39:26,349 INFO - OpenSim.OpenSim > >==================================================================== > >2010-06-27 20:39:26,349 INFO - OpenSim.OpenSim [OPENSIM MAIN]: Running in > >sandbox mode > >2010-06-27 20:39:26,366 INFO - OpenSim.Region.Framework.StorageManager > >[DATASTORE]: Attempting to load OpenSim.Data.MySQL.dll > >2010-06-27 20:39:26,377 INFO - OpenSim.Data.MySQL.MySQLEstateStore [REGION > >DB]: MySql - connecting: Data Source=localhost;Database=opensim;User > >ID=opensimulator;Password=secretish; > >2010-06-27 20:39:26,568 ERROR - OpenSim.Application [APPLICATION]: > >APPLICATION EXCEPTION DETECTED: System.UnhandledExceptionEventArgs > > > >Exception: MySql.Data.MySqlClient.MySqlException: Connection unexpectedly > >terminated. > > at MySql.Data.MySqlClient.MySqlStream.LoadPacket () [0x00000] in <filename > > unknown>:0 > > at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000] in <filename > > unknown>:0 > > at MySql.Data.MySqlClient.NativeDriver.Open () [0x00000] in <filename > > unknown>:0 > > at MySql.Data.MySqlClient.Driver.Create > > (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) [0x00000] in > > <filename unknown>:0 > > at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection () [0x00000] > > in <filename unknown>:0 > > at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection () [0x00000] in > > <filename unknown>:0 > > at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver () [0x00000] in > > <filename unknown>:0 > > > >Application is terminating: True > > > > > >Also, I've found out how to enable the general log file in MySQL. > >While the error message "Connection unexpectedly terminated" > >suggests that a connection was made and then broken, > >perhaps because of a bad password, MySQL's log file > >shows that OpenSim is not connecting at all > >-- all the connections to MySQL are from the > >command-line client 'mysql' program. > > > >So I'm still stumped! > > > > > >Greg > > > > > > > > > >On 2010-Jun-27, Marck wrote: > >>> [email protected] wrote: > >>>> >I have some trouble getting OpenSim to start using MySQL. > >>>> > > >>>> >OpenSim version: 0.6.9 > >>>> >Operating system: Arch Linux, Linux 2.6.33 > >>>> >MySQL version: 5.1.47-1 > >>>> >Mono version: 2.6.4-2 > >>>> > > >>>> >Here's the problem: Every time I start opensim, it cannot get > >>>> >(and keep) a connection to MySQL. This is the first line of > >>>> >the error messages: > >>>> > > >>>> >22:13:11 - Error loading plugin from OpenSim.Services.AssetService.dll, > >>>> >exception MySql.Data.MySqlClient.MySqlException: Connection > >>>> >unexpectedly terminated. > >>>> > > >>>> >I have the default configuration files, except in > >>>> >StandaloneCommon.ini, I have commented out > >>>> > > >>>> >; StorageProvider = "OpenSim.Data.SQLite.dll" > >>>> > > >>>> >and have uncommented and modified these two lines: > >>>> > > >>>> > StorageProvider = "OpenSim.Data.MySQL.dll" > >>>> > ConnectionString = "Data Source=localhost;Database=opensim;User > >>>> > ID=opensimulator;Password=********;" > >>> > >>> Have you also changed the configuration in OpenSim.ini to use MySQL? It > >>> is not sufficient to only do changes in StandaloneCommon.ini. You also > >>> need to adjust the settings for "storage_plugin" and > >>> "storage_connection_string" in the [Startup] section, and > >>> "inventory_plugin", "inventory_source", "userDatabase_plugin", and > >>> "user_source" in the [StandAlone] section of OpenSim.ini. > >>> > >>>> >Now, I *do* have mysqld running! > >>>> > > >>>> >And I can connect to it with the shell mysql client using the same > >>>> >database, user name, and password: > >>>> > > >>>> >$ mysql -h localhost -D opensim -u opensimulator --password=******** > >>>> >Welcome to the MySQL monitor. Commands end with ; or \g. > _______________________________________________ > Opensim-users mailing list > [email protected] > https://lists.berlios.de/mailman/listinfo/opensim-users -- ___ ___ __ _ / _ \ / _ \| | | | Gregory D. Weber, Associate Professor / /_\// / | | | /\ | | Indiana University East / /_\\/ /__| | |/ \| | http://mypage.iu.edu/~gdweber/ \____/\_____/\___/\__/ Tel. (765) 973-8420; FAX (765) 973-8550 _______________________________________________ Opensim-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/opensim-users
