Centos7 MariaDB安装
文章目录
[隐藏]
- 安装MariaDB-server
- 配置root账户
MariaDB 是 MySQL 数据库的自由开源分支,与 MySQL 在设计思想上同出一源,在未来仍将是自由且开源的。Red Hat Enterprise Linux/CentOS 7.0 发行版已将默认的数据库从 MySQL 切换到 MariaDB.
安装MariaDB-server
yum -y update yum -y install mysql yum -y install mariadb-server mariadb-client systemctl enable mariadb systemctl start mariadb systemctl status mariadb
[root@centos-rpi2 ~]# systemctl status mariadb
● mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled) Active: active (running) since Wed 2017-10-11 09:46:50 HKT; 4h 12min ago Main PID: 1425 (mysqld_safe) CGroup: /system.slice/mariadb.service ├─1425 /bin/sh /usr/bin/mysqld_safe –basedir=/usr └─1587 /usr/libexec/mysqld –basedir=/usr –datadir=/var/lib/mysql…
Oct 11 09:46:36 centos-rpi2 mariadb-prepare-db-dir[1346]: Initializing MariaD… Oct 11 09:46:37 centos-rpi2 mariadb-prepare-db-dir[1346]: 171011 9:46:37 [No… Oct 11 09:46:38 centos-rpi2 mariadb-prepare-db-dir[1346]: 171011 9:46:38 [No… Oct 11 09:46:39 centos-rpi2 mariadb-prepare-db-dir[1346]: PLEASE REMEMBER TO … Oct 11 09:46:39 centos-rpi2 mariadb-prepare-db-dir[1346]: To do so, start the… Oct 11 09:46:39 centos-rpi2 mariadb-prepare-db-dir[1346]: ‘/usr/bin/mysqladmi… Oct 11 09:46:39 centos-rpi2 mariadb-prepare-db-dir[1346]: ‘/usr/bin/mysqladmi… Oct 11 09:46:40 centos-rpi2 mysqld_safe[1425]: 171011 09:46:40 mysqld_safe L…. Oct 11 09:46:40 centos-rpi2 mysqld_safe[1425]: 171011 09:46:40 mysqld_safe S…l Oct 11 09:46:50 centos-rpi2 systemd[1]: Started MariaDB database server. Hint: Some lines were ellipsized, use -l to show in full.
配置root账户
mysql -u root -p
直接回车
[root@centos-rpi2 ~]# 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.56-MariaDB MariaDB Server Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the current input statement. MariaDB [(none)]>
use mysql; update user set password=password('Shuai_sqj') where user='root'; grant all privileges on *.* to 'root'@'%' identified by 'Shuai_sqj' with grant option; //创建root远程管理 flush privileges; exit
原文出处:shuaiqijun -> http://shuaiqijun.com/2017/10/11/Centos7-MariaDB%E5%AE%89%E8%A3%85/
本站所发布的一切资源仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。如果侵犯你的利益,请发送邮箱到 [email protected],我们会很快的为您处理。