Update database_setup.md
This commit is contained in:
@@ -6,23 +6,6 @@ This section shows setup for both Windows and Linux.
|
||||
## How to Set Up the MariaDB Database [WINDOWS]
|
||||
Before running the servers, you’ll need a MariaDB database properly configured with the right tables and data. Here's how to do it step by step:
|
||||
|
||||
### Step 0 (Optional but recommended for an easy setup)
|
||||
- Find `my.ini` inside your MariaDB folder. (Usually it can be found in `"C:\Program Files\MariaDB 11.6\data\my.ini"`
|
||||
- Replace its contents with the following:
|
||||
```cpp
|
||||
[mysqld]
|
||||
skip-grant-tables
|
||||
datadir="C:/Program Files/MariaDB 11.6/data"
|
||||
port=3305
|
||||
innodb_buffer_pool_size=1967M
|
||||
|
||||
[client]
|
||||
port=3305
|
||||
plugin-dir="C:/Program Files/MariaDB 11.6/lib/plugin"
|
||||
```
|
||||
|
||||
Of course, make sure the paths are correct for you and that you have the necessary things installed (like innoDB).
|
||||
|
||||
### Step 1: Install MariaDB
|
||||
If you haven’t already installed MariaDB:
|
||||
|
||||
@@ -68,27 +51,29 @@ On Windows:
|
||||
Done!
|
||||
|
||||
|
||||
### Step 5: Start mariaDB
|
||||
Simply open a terminal and type `net start mariadb`. By default this will run on port 3306, so make sure to use the correct database port on the `config.ini` file!
|
||||
|
||||
|
||||
|
||||
## How to Set Up the MariaDB Database [LINUX]
|
||||
### Step 0 (Optional but recommended for an easy setup)
|
||||
- Edit the MariaDB configuration file (usually found at `/etc/mysql/mariadb.conf.d/50-server.cnf or /etc/my.cnf`)
|
||||
- Add or modify the following sections:
|
||||
### Step 5 (Optional but recommended for an easy setup)
|
||||
- Find `my.ini` inside your MariaDB folder. (Usually it can be found in `"C:\Program Files\MariaDB 11.6\data\my.ini"`
|
||||
- Replace its contents with the following:
|
||||
```cpp
|
||||
[mysqld]
|
||||
skip-grant-tables
|
||||
datadir=/var/lib/mysql
|
||||
datadir="C:/Program Files/MariaDB 11.6/data"
|
||||
port=3305
|
||||
innodb_buffer_pool_size=1967M
|
||||
|
||||
[client]
|
||||
port=3305
|
||||
plugin-dir="C:/Program Files/MariaDB 11.6/lib/plugin"
|
||||
```
|
||||
Make sure paths correspond to your installation. `datadir` generally defaults to `/var/lib/mysql`
|
||||
|
||||
Of course, make sure the paths are correct for you and that you have the necessary things installed (like innoDB).
|
||||
|
||||
### Step 6: Start mariaDB
|
||||
Simply open a terminal and type `net start mariadb`. By default this will run on port 3306, so make sure to use the correct database port on the `config.ini` file!
|
||||
|
||||
|
||||
|
||||
## How to Set Up the MariaDB Database [LINUX]
|
||||
### Step 1: Install MariaDB
|
||||
- Debian/Ubuntu:
|
||||
```cpp
|
||||
@@ -119,15 +104,26 @@ If you want it to be permanent:
|
||||
- For bash: `echo 'export MICRO_DB_PW=your_db_password_here' >> ~/.bashrc`
|
||||
- For zsh: `echo 'export MICRO_DB_PW=your_db_password_here' >> ~/.zshsrc`
|
||||
|
||||
### Step 5: Start the service
|
||||
### Step 5 (Optional but recommended for an easy setup)
|
||||
- Edit the MariaDB configuration file (usually found at `/etc/mysql/mariadb.conf.d/50-server.cnf or /etc/my.cnf`)
|
||||
- Add or modify the following sections:
|
||||
```cpp
|
||||
[mysqld]
|
||||
skip-grant-tables
|
||||
datadir=/var/lib/mysql
|
||||
port=3305
|
||||
innodb_buffer_pool_size=1967M
|
||||
|
||||
[client]
|
||||
port=3305
|
||||
```
|
||||
Make sure paths correspond to your installation. `datadir` generally defaults to `/var/lib/mysql`
|
||||
|
||||
### Step 6: Start the service
|
||||
`sudo systemctl start mariadb`
|
||||
You can check if it's running with `sudo systemctl status mariadb`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Next
|
||||
[3.4 Setting up the client](https://github.com/SoWeBegin/MicrovoltsEmulator/blob/mv1.1_2.0/doc/client_setup.md)
|
||||
|
||||
Reference in New Issue
Block a user