-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FAssets transition guide, database setup
- Loading branch information
1 parent
e0ece3e
commit 0c1beb2
Showing
9 changed files
with
136 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## Prerequisites | ||
|
||
You need a server with at least a minimum of 2 CPUs and 4GB RAM, or 2GB if the database is on a separate server. | ||
|
||
You need knowledge of the following tools: | ||
|
||
* [Git](https://git-scm.com/) version control system | ||
* [Yarn](https://yarnpkg.com/) package manager | ||
* A [wallet](../../user/wallets/index.md) configured for [Flare networks](../../dev/reference/network-config.md) | ||
* Command-line terminal | ||
* Code editor | ||
* [MySQL](https://dev.mysql.com/doc/) server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## Prerequisites | ||
|
||
You need a server with at least a minimum of 2 CPUs and 4GB RAM, or 2GB if the database is on a separate server. | ||
|
||
You need knowledge of the following tools: | ||
|
||
* [Git](https://git-scm.com/) version control system | ||
* [Yarn](https://yarnpkg.com/) package manager | ||
* A [wallet](../../user/wallets/index.md) configured for [Flare networks](../../dev/reference/network-config.md) | ||
* Command-line terminal | ||
* Code editor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
### Setting up MySQL Database | ||
|
||
You must set up a MySQL database to continue with this process. For detailed instructions and additional guidance, refer to the official [MySQL documentation](https://dev.mysql.com/doc/). | ||
|
||
You can find MySQL database connection parameters in the file listed as the value for the variable `FASSET_BOT_CONFIG` in the `.env` file. | ||
|
||
Create a new user in MySQL that will be used by the `fasset-bots` to connect to the database. In this example, we will create a user with the username `fassetbot` and password `VerySafePassword`, which you must replace with a secure value. | ||
|
||
!!! warning | ||
You only need to create the user in the database and grant privileges to that user. Do not create the database. | ||
|
||
1. Open your terminal or command prompt and login to MySQL database using the `mysql` command with the appropriate credentials: | ||
|
||
2. Create a new user `fassetbot` in MySQL database using the "CREATE USER" command with the password "VerySafePassword": | ||
|
||
```sql | ||
CREATE USER 'fassetbot'@'localhost' IDENTIFIED BY 'VerySafePassword'; | ||
``` | ||
|
||
3. Grant all privileges on all databases to the user by using the `GRANT` statement: | ||
|
||
```sql | ||
GRANT ALL PRIVILEGES ON *.* TO 'fassetbot'@'localhost' WITH GRANT OPTION; | ||
``` | ||
|
||
4. **Grant Privileges:** | ||
After creating the user, you need to grant appropriate privileges to the user. Use the `GRANT` statement to give permissions to the user. For example, to grant all privileges on `fasset_bots` database: | ||
```sql | ||
GRANT ALL PRIVILEGES ON fasset_bots.* TO 'fassetbot'@'localhost' WITH GRANT OPTION; | ||
``` | ||
|
||
5. Exit the MySQL database prompt by typing: | ||
|
||
```bash | ||
exit; | ||
``` |