1 changed files with 21 additions and 0 deletions
			
			
		| @ -1,3 +1,24 @@@@ -1,3 +1,24 @@ | ||||
| ### Setting up an external database for use with MagicBox | ||||
| 
 | ||||
| > The MagicBox is a transient thing; it lasts only until the container is stopped.  Users must configure an external database if they wish for their world to persist. | ||||
| 
 | ||||
| For utility we will use a MySQL container for this purpose. | ||||
| 
 | ||||
| `$ docker pull mysql:latest` | ||||
| 
 | ||||
| Now let's spin up our new mysql server.  Choose your own root password here. | ||||
| 
 | ||||
| `$ docker run --name mysql -p 3306:3306 -v mysql_volume:/var/lib/mysql/ -d -e "MYSQL_ROOT_PASSWORD=ROOTPASS" mysql` | ||||
| 
 | ||||
| Copy the mb.data/magicbanesql.conf file making the following edits. | ||||
| 
 | ||||
| - Set your own password | ||||
| - Change localhost to the wildcard.  (Allows remote access) | ||||
| 
 | ||||
| ```console | ||||
| SET GLOBAL log_bin_trust_function_creators = 1; | ||||
| CREATE USER 'magicbox'@'%' IDENTIFIED BY 'YOURPASSHERE'; | ||||
| CREATE DATABASE magicbane; | ||||
| GRANT ALL PRIVILEGES ON *.* TO 'magicbox'@'%'; | ||||
| FLUSH PRIVILEGES; | ||||
| ``` | ||||
					Loading…
					
					
				
		Reference in new issue