Mariadb

1.配置数据库yum源

[root@web-001 ~]# cat /etc/yum.repos.d/MariaDB.repo
# MariaDB 10.1 CentOS repository list - created 2016-05-12 09:28 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

至MariaDB.repo文件,保存文件并退出

安装数据库:

yum install MariaDB-server MariaDB-client -y

2.Mariadb服务

启动服务:

systemctl start mariadb.service

停止服务:

systemctl stop mariadb.service

重启服务:

systemctl restart mariadb.service

查看状态

systemctl status mariadb.service

3.生产服务器需要执行mysql_secure_installation

[root@web-001 ~]# /usr/bin/mysql_secure_installationNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDBSERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.Enter current password for root (enter for none):
OK, successfully used password, moving on...Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.Set root password? [Y/n] n //是否设置root密码... skipping.By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.Remove anonymous users? [Y/n] y //是否删除匿名用户... Success!Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.Disallow root login remotely? [Y/n] y //是否允许root远程登陆... Success!By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.Remove test database and access to it? [Y/n] y  //是否删除test库- Dropping test database...... Success!- Removing privileges on test database...... Success!Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.Reload privilege tables now? [Y/n] y //重新刷新授权... Success!Cleaning up...All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.Thanks for using MariaDB!

登陆mysql

[root@web-001 ~]# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.1.14-MariaDB MariaDB ServerCopyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)MariaDB [(none)]> Bye

设置root密码

'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h iZ250234rf8Z password 'new-password'

转载于:https://blog.51cto.com/noodle/1792926

centos7安装mariadb相关推荐

  1. CentOS7安装MariaDB的流程步骤

    安装前需要彻底清除你的服务器计算机上原来安装过的mysql.maraidb的文件,不然会出现各种问题. CentOS7安装MariaDB的流程步骤如下: ======================= ...

  2. CentOS7安装MariaDB 10.4x

    CentOS7安装MariaDB 10.4x 1.下载安装包 2.按顺序安装依赖环境包 2.1 安装依赖环境包: yum install rsync nmap lsof perl-DBI nc 2.2 ...

  3. centos7 安装mariadb

    1. 为什么安装mariadb MariaDB数据库管理系统是MySQL的一个分支,主要由开源社区在维护,采用GPL授权许可. MariaDB目的是完全兼容MySQL,包括API和命令行,她们有相同的 ...

  4. 09 CentOS7安装MariaDB(MYSQL分支)

    1.安装和设置数据库 在CentOS7下,默认安装的数据库为MariaDB,属于MySQL数据库的一个分支,所以我还是使用了MariaDB.安装命令为: yum install mariadb-ser ...

  5. centos7 mariadb mysql_【软件安装】CentOS7安装MariaDb(mysql_替代品安装)

    1.背景 Maria Db是流行的跨平台MySQL数据库管理系统的分支,被认为是MySQL 的完全替代品.Maria Db是由Sun在Sun Micro systems合并期间被Oracle收购后,于 ...

  6. Centos7安装mariadb galera cluster数据库集群 详解

    #Galera集群特点 集群之间无延时,同步复制.而master-slave主从异步复制,存在延迟. active-active多主,集群内部服务器都是同时写,必须等所有集群内所有数据库都完成数据写入 ...

  7. CentOS7 编译安装 Mariadb

    安装步骤: 1.准备 1.1 显示系统版本 [root@centos ~]# cat /etc/redhat-release CentOS Linux release 7.0.1406 (Core) ...

  8. centos7下安装mariadb

    centos7下安装mariadb 参考: http://www.cnblogs.com/Netsharp/p/5875474.html https://downloads.mariadb.org/m ...

  9. Centos7.4 yum 安装MariaDB

    Centos7.4 yum 安装MariaDB #系统及版本选择:https://downloads.mariadb.org/mariadb/repositories/#mirror=tuna vim ...

最新文章

  1. MySQL解压版配置
  2. 使用hyperopt(Bayesian optimization)为xgboost模型挑选最优参数进行模型构建、by Cross Validation
  3. Prismatic 机器学习不一定得用大框架
  4. python 可视化大屏幕_如何用python搭建可视化看板?
  5. P1948 [USACO08JAN]Telephone Lines S(二分+spfa)
  6. 设计师专用新年春节2021牛年艺术字体,提升设计效率!
  7. 读取XML文件时,总报“前言中不允许有内容”错误-分析
  8. Linux故障解决(2)——使用yum安装netcat 及报错问题解决
  9. 用deque模拟栈解决八皇后问题
  10. 关于net2.0里面新出现的类backgroundworker的应用
  11. mysql开启slowquery_log_MySQL slow_query_log慢查询日志配置详解
  12. 体验与对比新版EBS gp3 vs gp2
  13. latex normal是几号字_Latex 文本详细篇
  14. HTML制作手风琴效果,Dreamweaver制作手风琴图片展示效果(附代码)
  15. MySQL中information_schema详解
  16. Go:Aho-Corasick 算法(附完整源码)
  17. Linux系统编程 74 孤儿进程和僵尸进程
  18. 关于opencv中cvtcolor函数的code参数用CV_BGR2YUV与CV_BGR2YCrCb的了解
  19. 读《终身学习:10个你必须掌握的未来生存法则》整理
  20. python turtle 绘图小猪佩奇,Python使用turtle库绘制小猪佩奇(实例代码)

热门文章

  1. 思科将在网络中融入人工智能和机器学习
  2. 用泰勒级数来估计函数的近似值
  3. 没有最快,只有更快!富士通74.7秒在ImageNet上训练完ResNet-50
  4. 图像语义分割之FCN和CRF
  5. 【机器学习】24个终极项目提升您的机器学习知识和技能
  6. 干货丨 从遗传算法到强化学习,一文介绍五大生物启发式学习算法
  7. leetcode--Two Sum
  8. PPT插入文本框但是字体并不是想要的
  9. pycharm如何执行高级撤销操作回到历史
  10. 简要解释什么是Conv1d,Conv2d,Conv3d