参考:http://www.centoscn.com/image-text/install/2014/0909/3704.html
https://mariadb.com/kb/en/mariadb/yum/
mysql 和mariadb 的关系(来源于网络):
MySQL之父Widenius先生离开了Sun之后,觉得依靠Sun/Oracle来发展MySQL,实在很不靠谱,于是决定另开分支,这个分支的名字叫做MariaDB。
MariaDB跟MySQL在绝大多数方面是兼容的,对于开发者来说,几乎感觉不到任何不同。目前MariaDB是发展最快的MySQL分支版本,新版本发布速度已经超过了Oracle官方的MySQL版本。
MariaDB 是一个采用Aria存储引擎的MySQL分支版本,是由原来 MySQL 的作者Michael Widenius创办的公司所开发的免费开源的数据库服务器。[1]
这个项目的更多的代码都改编于 MySQL 6.0,例如 “pool of threads”功能提供解决多数据连接问题。
所以对于大部分的MySQL用户来说,从现在主流的MySQL转到MariaDB应该是没有什么难度的
=============================这里mariadb 是mysql5.5版本==========================
mariadb 安装:
yum -y install mariadb*
安装完成后:
开机自动开启服务:
[root@localhost ~]# systemctl enable mariadb.service Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service. [root@localhost ~]# systemctl start mariadb.service
mysql 命令测试一下:
[root@localhost ~]# mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 2 Server version: 5.5.50-MariaDB MariaDB Server Copyright (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 | | test | +--------------------+ MariaDB [(none)]> use test Database changed MariaDB [test]> show tables; Empty set (0.00 sec) MariaDB [test]> exit Bye
使用命令mysql_secure_installation安全配置:
[root@localhost ~]# mysql_secure_installation /usr/bin/mysql_secure_installation:行379: find_mysql_client: 未找到命令 NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS 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] y New password: (密码) Re-enter new password:(重复上面的密码) Password updated successfully! Reloading privilege tables.. ... Success! 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. (下面可以一路y下去了) 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 ... 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 - 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!
以上就配置完成了!!!
重新登录一下:
[root@localhost ~]# mysql -uroot -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 11 Server version: 5.5.50-MariaDB MariaDB Server Copyright (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)]>
确认一下是不是开机自启动:
[root@localhost ~]# systemctl is-enabled mariadb enabled
数据库创建用户、授权请参考:http://youngbrick.iteye.com/blog/2335889
============下面通过oracle 官方yum源安装mysql5.7=======================
参考官方:https://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.html
参考: http://www.centoscn.com/mysql/2016/0626/7537.html
在这找你要的rpm版本:https://dev.mysql.com/downloads/repo/yum/
1、下载rpm
#wget http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm #rpm -ivh mysql57-community-release-el7-9.noarch.rpm2、安装mysql
相关推荐
在 CentOS 7.2 x86_64 系统上安装 MySQL 5.7.13 需要进行一些前期准备,包括检查和移除可能存在的 MariaDB 相关组件。 1. **检查和卸载 MariaDB**: - 使用 `rpm -qa | grep mariadb` 命令来检查是否已安装 ...
如果你对其他版本的MySQL或MariaDB的安装有兴趣,可以参考相关文章,例如CentOS 7上安装MySQL 5.5、5.7或MariaDB的教程,以及使用源码安装MySQL 5.7.6及更高版本的详细步骤。 总之,安装MySQL 5.6.32在CentOS 7.2上...
MySQL 5.5/5.6/5.7/8.0 MariaDB 5.5/10.0/10.1/10.2/10.3 PHP 5.4/5.5/5.6/7.0/7.1/7.2 phpMyAdmin Adminer 使用源代码编译 OpenSSL 1.1.0f Nginx 1.13.7 PHP 7.2.0 正在安装 使用YUM软件包: sh -c " $( curl -...
提供多个数据库版本(MySQL-8.0、MySQL-5.7、MySQL-5.6、MySQL-5.5、MariaDB-10.3、MariaDB-10.2、MariaDB-10.1、MariaDB-5.5、Percona-8.0、Percona-5.7、Percona-5.6 , Percona-5.5, AliSQL-5.6, PostgreSQL, ...
提供多个数据库版本(MySQL-8.0、MySQL-5.7、MySQL-5.6、MySQL-5.5、MariaDB-10.3、MariaDB-10.2、MariaDB-10.1、MariaDB-5.5、Percona-8.0、Percona-5.7、Percona-5.6 , Percona-5.5, AliSQL-5.6, PostgreSQL, ...
提供多个数据库版本(MySQL-8.0、MySQL-5.7、MySQL-5.6、MySQL-5.5、MariaDB-10.3、MariaDB-10.2、MariaDB-10.1、MariaDB-5.5、Percona-8.0、Percona-5.7、Percona-5.6 , Percona-5.5, AliSQL-5.6, PostgreSQL, ...
在这个"Linux CentOS-7 Zabbix5.0安装包"中,我们将深入探讨如何在CentOS-7上安装和配置Zabbix 5.0,以及这个过程中的关键知识点。 首先,安装Zabbix 5.0前,确保你的CentOS-7系统已经更新至最新版本,并安装了必要...
提供多个数据库版本(MySQL-8.0、MySQL-5.7、MySQL-5.6、MySQL-5.5、MariaDB-10.3、MariaDB-10.2、MariaDB-10.1、MariaDB-10.0、MariaDB-5.5、Percona-5.7、Percona-5.6 , Percona-5.5, AliSQL-5.6, PostgreSQL, ...
提供多个数据库版本(MySQL-8.0、MySQL-5.7、MySQL-5.6、MySQL-5.5、MariaDB-10.3、MariaDB-10.2、MariaDB-10.1、MariaDB-10.0、MariaDB-5.5、Percona-5.7、Percona-5.6 , Percona-5.5, AliSQL-5.6, PostgreSQL, ...
提供多个数据库版本(MySQL-8.0、MySQL-5.7、MySQL-5.6、MySQL-5.5、MariaDB-10.3、MariaDB-10.2、MariaDB-10.1、MariaDB-5.5、Percona-8.0、Percona-5.7、Percona-5.6 , Percona-5.5, AliSQL-5.6, PostgreSQL, ...