PlayerServers
Search…
Creating MySQL database
In order to create required MySQL database on your server, you first need to have mariadb-server installed. If you don't have it, please run the command below:
Please note that it is generally recommended to executeapt-get updatebefore installing new packages on the machine, as else you might encounter some errors.
1
$ apt-get install mariadb-server -y
Copied!
After successfully installing MariaDB server, you can now proceed with creating required databases. First of all, you need to login to the mysql terminal. Execute the command below in order to do so.
1
$ mysql -u root -p
Copied!
After that, we need to create user. You can do that by executing the command below:
1
CREATE USER 'playerserversuser'@'127.0.0.1' IDENTIFIED BY 'somePassword';
Copied!
After that, you need to create new database for PlayerServers:
1
CREATE DATABASE PlayerServers;
Copied!
Next up, we need to give playerservers user permission to access the database. We can do that by executing the next two commands:
1
GRANT ALL PRIVILEGES ON PlayerServers.* TO 'playerserversuser'@'127.0.0.1';
2
FLUSH PRIVILEGES;
Copied!

That's it!

If you've done everything correctly, you'll now have a new user called playerserversuser which will have password you defined in the second step undersomePasswordfield and that user will be able to access the newely created database called PlayerServers.
Copy link