原文: Debian 11 Bullseye通过apt-get安装Mariadb 10.7。
在Debian 11 Bullseye通过apt-get
安装Mariadb 10.7
过程记录如下。
一、环境信息
- 系统:Debian GNU/Linux 11 (bullseye);
- Mariadb 10.7;
- 用户:winbert,非root用户;
二、安装
仓库构建:
winbert@winbert-debian:~$ curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash
# [info] Checking for script prerequisites.
# [info] MariaDB Server version 10.7 is valid
# [info] Repository file successfully written to /etc/apt/sources.list.d/mariadb.list
# [info] Adding trusted package signing keys...
# [info] Running apt-get update...
# [info] Done adding trusted package signing keys
系统更新:
sudo apt update
执行安装:
sudo apt-get install mariadb-server mariadb-client
查看状态:
sudo systemctl status mariadb
设置密码:
sudo mysqladmin -u root password 'type_your_passord_here'
登录测试:
mysql -u root -p
#然后根据提示输入你的密码
设置允许远程登录:
MariaDB [(none)]> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [mysql]> select user,host from user;
+-------------+-----------+
| User | Host |
+-------------+-----------+
| mariadb.sys | localhost |
| mysql | localhost |
| root | localhost |
+-------------+-----------+
3 rows in set (0.002 sec)
MariaDB [mysql]> grant all privileges on *.* to root@'%' identified by "type_your_passord_here";
Query OK, 0 rows affected (0.002 sec)
MariaDB [mysql]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.001 sec)
MariaDB [mysql]>
如果设置完成仍不能远程连接,请参考: MySQL无法进行远程连接情形排查分析。
参考:
- https://mariadb.com/kb/en/mariadb-package-repository-setup-and-usage/
最新评论
网飞没问题, 迪士尼+有解决方案么?
pp助手是安卓手机用的,根本下载用不来苹果
已解决
这样的话数据库里的结构为{"attachment":{"content":"xxx"}}, 要怎么才能变成{"content":"xxx"},从而使结构保持一致?
赞! make test不过的坑都写到的,谢谢楼主~
谢谢你
用了root用户还是一直502是怎么回事呢
student id 是空的