Configuring a database: Difference between revisions

From Open Metaverse Wiki
(Created page with "==Set up MySQL the first time== My last server came with MariaDB 10 installed, I think this is the new default database. MariaDB is a fork from MySQL and they both work well with It is unclear if this has the new features I need from MySQL 8.0 I ended up uninstalling MariaDB and installing mysql 8.0 systemctl stop mysql apt purge mariadb* apt autoremove shutdown -r 0 #reboot your server log back in to root again ==Installing MySQL 8.0== apt inst...")
 
m (Adding backlink to the Grid owners index page)
 
Line 1: Line 1:
''[[Opensimulator]]: [[OpenSimulator Grid Owners Home|Grid Owners]]: Configuring a database''
==Set up MySQL the first time==
==Set up MySQL the first time==
My last server came with MariaDB 10 installed, I think this is the new default database. MariaDB is a fork from MySQL and they both work well with  It is unclear if this has the new features I need from MySQL 8.0 I ended up uninstalling MariaDB and installing mysql 8.0
My last server came with MariaDB 10 installed, I think this is the new default database. MariaDB is a fork from MySQL and they both work well with  It is unclear if this has the new features I need from MySQL 8.0 I ended up uninstalling MariaDB and installing mysql 8.0

Latest revision as of 22:57, 27 September 2023

Opensimulator: Grid Owners: Configuring a database

Set up MySQL the first time

My last server came with MariaDB 10 installed, I think this is the new default database. MariaDB is a fork from MySQL and they both work well with It is unclear if this has the new features I need from MySQL 8.0 I ended up uninstalling MariaDB and installing mysql 8.0

   systemctl stop mysql
   apt purge mariadb*
   apt autoremove
   shutdown -r 0		#reboot your server log back in to root again

Installing MySQL 8.0

   apt install mysql-server-core-8.0 mysql-server-8.0

Older versions of MySQL had an setup program for choosing a root password. Recent versions have no password to the database root account. Instead, if you run mysql from the root account of your server, no password is needed. I set one anyway.

   mysql
   ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPassword';
   exit;

Create a Database and User Account for Running OpenSim

   mysql
   create database robust;
   create database opensim;
   CREATE USER osuser@localhost IDENTIFIED WITH mysql_native_password BY 'password';
   GRANT ALL PRIVILEGES ON opensim.* TO osuser@localhost;
   GRANT ALL PRIVILEGES ON robust.* TO osuser@localhost;
   FLUSH PRIVILEGES;
   exit;

If you are going to use the DTS Money Module, create a database for that as well:

   mysql
   create database money;
   GRANT ALL PRIVILEGES ON money.* TO osuser@localhost;
   exit;

Tune mysql to work well with OpenSim

Do this from root or su, Bob grant you slack if they change the cnf location.

   vi /etc/mysql/mysql.conf.d/mysqld.cnf
   	down at the end of the file insert these lines:
   #
   # Optimizations for  OpenSim
   tls_version=TLSv1.2
   default-authentication-plugin=mysql_native_password
   innodb_buffer_pool_size = 1048576
   innodb_buffer_pool_instances = 8
   innodb_flush_log_at_trx_commit = 2
   innodb_file_per_table = 1
   max_connections = 3000
   interactive_timeout = 1209600
   wait_timeout = 1209600
   	;restart the mysql service
   service mysql restart
   systemctl restart mysql		;alternate way you will see some people use

Next, Install a bunch of programs you will need