Centos7 安装MySQL
来自CloudWiki
以下是安装myriadb的方法,myriadb与mysql通用:
MariaDB 数据库管理系统是 MySQL 的一个分支,主要由开源社区在维护,采用 GPL 授权许可。开发这个分支的原因之一是:甲骨文公司收购了 MySQL 后,有将 MySQL 闭源的潜在风险,因此社区采用分支的方式来避开这个风险。MariaDB完全兼容mysql,使用方法也是一样的
安装MariaDB
yum install mariadb-server
配置MariaDB
修改 /etc/my.cnf文件[mysqld]中添加
max_connections=10000 default-storage-engine = innodb innodb_file_per_table collation-server = utf8_general_ci init-connect = 'SET NAMES utf8' character-set-server = utf8
启动MariaDB
[root@localhost mxshop]# systemctl enable mariadb Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service. [root@localhost mxshop]# systemctl start mariadb
设置MariaDB
mysql_secure_installation
按enter确认后设置数据库root密码
Remove anonymous users? [Y/n] y Disallow root login remotely? [Y/n] n Remove test database and access to it? [Y/n] y Reload privilege tables now? [Y/n] y
21:12:38 https://www.jianshu.com/p/e3b92d9e65d3
无名泉 2019/10/5 21:13:09 https://www.cnblogs.com/ivictor/p/5142809.html