MySQL is a free relational database management system.
To begin with, we update the lists of packages and repositories of the system:
sudo apt-get -y update && sudo apt-get -y dist-upgradeAdding a repository MariaDB:
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bashInstalling MariaDB:
sudo apt-get -y install mariadb-serverNext, activate the program using the command
mysql -u root -pSymbol «;» is required in SQL-запросах!
Choosing MySQL:
USE mysql;Creating the first user:
CREATE USER 'spacecore'@'localhost' IDENTIFIED BY '123456';Now we are creating a Database:
CREATE DATABASE server;Using two commands, we give the user access to the Database:
GRANT ALL PRIVILEGES ON server.* TO 'spacecore'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;Opening the database from the outside:
If you need to connect to MySQL not from localhost, then you need to edit /etc/mysql/my.cnf, find the bind-address string so that it looks like this:
#bind-address = 127.0.0.1Restarting MySQL:
service mysql-server restartLast updated