Cod: Selectaţi tot
pkg install mariadb103-client mariadb103-server
Cod: Selectaţi tot
pwd_mkdb -p /etc/master.passwd
Cod: Selectaţi tot
chown -R mysql /var/db/mysql/
chgrp -R mysql /var/db/mysql/
Cod: Selectaţi tot
echo 'mysql_enable="YES"' >> /etc/rc.conf
Type the following command to activate MariaDB
service mysql-server start
Enter the following commands to change the root account password.
mysqladmin -uroot -p password
Enter password: <123456>
New password: <123456>
Confirm new password: <123456.>
To connect directly with programs like Navicat, enter the following commands in order.
First, we connect to the mariadb server. After typing the command, we enter our password.
Cod: Selectaţi tot
mysql -p
Cod: Selectaţi tot
CREATE USER 'root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
flush privileges;
quit;
If you have installed mariadb version 10.5, you will not be able to connect directly. You can check here
Cod: Selectaţi tot
[mysqld]
bind-address = 0.0.0.0
Cod: Selectaţi tot
service mysql server restart
n version 10.5, the following was added and resolved, but they changed it
Cod: Selectaţi tot
[mysqld]
bind-addres = 0.0.0.0
Find>
Cod: Selectaţi tot
bind-address= 127.0.0.1
Cod: Selectaţi tot
bind-address= 0.0.0.0
service mysql-server restart