斐浦软件 - 安装Mariadb

删除

sudo apt-get remove mariadb-server
sudo apt-get remove mariadb-client
sudo apt-get remove --purge mysql-\*
sudo apt-get autoremove

安装

sudo apt-get install -y mariadb-server mariadb-client
sudo apt-get install -y mariadb-client

修改配置

sudo vim /etc/mysql/conf.d/mysql.cnf

[mysql]
default-character-set = utf8mb4

:wq!

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

[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

:wq!

注意原先有设置,需要注释掉;

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

初始化

sudo mysql_secure_installation


直接回车


设置

sudo mysql -u root -p
SHOW VARIABLES WHERE Variable_name LIKE 'character_set_%' OR Variable_name LIKE 'collation%';

use mysql; 

10.6不支持该命令;

UPDATE user SET plugin=' ' WHERE user ='root';
grant all privileges on *.* to 'root'@'%' identified by 'Abcabc88';
grant all privileges on *.* to root@'%' identified by 'Abcabc88' WITH GRANT OPTION;
grant all privileges on *.* to root@'localhost' identified by 'Abcabc88' WITH GRANT OPTION;
flush privileges;
quit

查看版本

sudo mysql --version

重启

sudo service mysql restart

备用

#Could not find Website Theme: Standard
innodb-read-only-compressed=FALSE

#Mariadb 10.6 版,该版本对 ROW=COMPRESSED 的表有一个限制(一些标准frappe模块表仍然是),因为它允许创建但强制是read-only,这意味着不能在里面放任何东西。在安装过程中有链接验证,所以这就是我看到这些错误的原因。

systemctl restart mariadb.service

设置root密码(这一步不需要做,在配置的时候做,下面两条命令备用:

ALTER USER root@localhost IDENTIFIED VIA mysql_native_password;
SET PASSWORD = PASSWORD('root');




此文档对你有帮助?

本页