MariaDB:修订间差异

来自MalacoKnowledge
imported>Malacology
init
 
imported>Malacology
add tag
 
第17行: 第17行:
<pre># systemctl enable mariadb
<pre># systemctl enable mariadb
# systemctl restart mariadb</pre>
# systemctl restart mariadb</pre>
[[分类:Server]]

2022年5月25日 (三) 10:34的最新版本

安装

# pacman -S mariadb

初始化

DATABASE_NAME USER_NAME MY_PASSWD 替换成自己想要的

mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
systemctl enable mariadb
systemctl restart mariadb
mysql_secure_installation
mysql -u root -p
CREATE DATABASE DATABASE_NAME;
use wallabag;
CREATE USER 'USER_NAME'@'localhost' IDENTIFIED BY 'MY_PASSWD';
GRANT ALL PRIVILEGES ON `USER_NAME`.* TO 'DATABASE_NAME'@'localhost'; 
FLUSH PRIVILEGES; 
exit

开机自启动

# systemctl enable mariadb
# systemctl restart mariadb