Pagina 1 din 1

[GHID] instalare mariadb (turcesc)

Scris: Mar Sep 05, 2023 2:54 pm
de dinamicop
-Video
Hidden Content
This board requires you to be registered and logged-in to view hidden content.

Cod: Selectaţi tot

pkg install mariadb103-client mariadb103-server
Enter the following command to create password databases

Cod: Selectaţi tot

pwd_mkdb -p /etc/master.passwd
Enter these commands to define permissions to mysql directory

Cod: Selectaţi tot

chown -R mysql /var/db/mysql/
chgrp -R mysql /var/db/mysql/
Enter the following command to activate the mariadb service automatically when booting the system.(Aici se poate face si manual editand fisierul cu notepad)

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
Run the query commands I gave below in order. Type your password where it says password.

Cod: Selectaţi tot

CREATE USER 'root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
flush privileges;
quit;
Additional update;
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
Don't forget to run the following command after adding the above!

Cod: Selectaţi tot

service mysql server restart
If you have installed mariadb version 10.5.11, you can have a look here .
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
Now what needs to be done is to change it in /usr/local/etc/mysql/conf.d/server.cnf as follows.
Find>

Cod: Selectaţi tot

bind-address= 127.0.0.1
Change to>

Cod: Selectaţi tot

bind-address= 0.0.0.0
After>Run the command
service mysql-server restart