Install MariaDB-server on the Raspberry Pi and use DBeaver to connect to the MariaDB database on Windows

The first step is to install mariadb-server

sudo apt install mariadb-server

The second step is to check the running status of mariadb

service mariadb status

The status is shown in the figure below:
insert image description here

The third step is to set up the database

sudo mysql_secure_installation

The fourth step is to log in to the database

insert image description here

The fifth step is to configure permissions

Configure common user remote login:

// username为用户名 password为用户密码
create user username@'%' identified by 'password';
 
//刷新权限
flush privileges;

Configure common user remote login:

//username为用户名 password为用户密码
create user username@localhost identified by 'password';
 
//刷新权限
flush privileges;

Configure root privileges for users for remote login

// 配置root权限  username为用户名,password为用户密码
grant all on *.* to username@'%' identified by 'password' with grant option;
 
//刷新权限
flush privileges;

The sixth step is to configure remote login

open configuration file

sudo vim /etc/mysql/mariadb.conf.d/50-server.cnf

Comment out bind-adderss
insert image description here
and restart the database

systemctl restart mariadb.service

Step 7: DBeaver connects to the database

Enter the IP address, user name, and password of the Raspberry Pi, and then you can connect.
insert image description here
After the connection is successful, the following figure is shown:
insert image description here

reference link

https://blog.csdn.net/qq_38070370/article/details/126534433

Guess you like

Origin blog.csdn.net/chenyu128/article/details/131101434