• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
山高我为峰
博客园    首页    新随笔    联系   管理    订阅  订阅
在CentOS 7 MySQL / MariaDB

在CentOS7中,MariaDB  替代了MySQL;更多复杂的疑问可以在这里查看 MariaDB versus MySQL – Compatibility

 

Install MySQL / MariaDB

安装MariaDB:

yum -y install mariadb-server mariadb

启动MySQL, 现在是 MariaDB:

systemctl start mariadb

MySQL/MariaDB 开机启动:

systemctl enable mariadb

检查 MySQL/MariaDB的状态:

systemctl status mariadb

停止 MySQL/MariaDB:

systemctl stop mariadb

检查命令客户端的安装:

mysql

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 5.5.40-MariaDB MariaDB Server

Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.

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

MariaDB [(none)]>

 

 

注:刚安装完是无法远程连接的,因为CentOS7 默认是开启了防火墙,怎么放开3306端口,请查看这里

 

posted on 2016-12-01 14:56  山高我为峰  阅读(233)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3