MariaDB学习笔记

 

1、CentOS 7安装MariaDB

yum install mariadb-server

 

2、新安装的MariaDB初始密码为空,可直接输入

mysql -u root -p

回车进入

[root@xxx xxx]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 5
Server version: 5.5.65-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

3、MariaDB 的默认数据存放在 /var/lib/mysql/ 目录下

From: https://www.mayanpeng.cn/archives/69.html

4、MariaDB启动、停止、查看状态命令

启动

systemctl start mariadb.service

停止

systemctl stop mariadb.service

查看状态

systemctl status mariadb.service

From: https://blog.csdn.net/ymaini/article/details/82258028

5、MariaDB启动报错

以查看mariadb的日志文件,查看错误原因

cd /var/log/mariadb/
vi mariadb.log

From: https://blog.csdn.net/twypx/article/details/81450240

6、配置文件位置

/etc/my.cnf

/etc/my.cnf.d/client.cnf

From: https://baijiahao.baidu.com/s?id=1645005043180459694

/etc/my.cnf

7、MariaDB重装

CentOS 7.x 卸载删除MariaDB,重新安装

https://blog.csdn.net/chengyuqiang/article/details/80210416

8、MariaDB初始登陆报错 ERROR 1045 (28000) 的解决办法

https://www.linuxidc.com/Linux/2017-03/141240.htm

 

posted @ 2020-05-25 15:07  ec04  阅读(241)  评论(0编辑  收藏  举报