CentOS:MariaDB安装:修订间差异
imported>Soleverlee 无编辑摘要 |
imported>Soleverlee 无编辑摘要 |
||
第25行: | 第25行: | ||
mysqladmin -uroot -p password | mysqladmin -uroot -p password | ||
</source> | </source> | ||
创建一个数据库 | |||
<source lang="bash"> | |||
create database js_huanan_db default charset utf8 collate utf8_general_ci; | |||
use js_huanan_db; | |||
create user js identified by '123456'; | |||
grant all on js_huanan_db.* to 'js'@'%'; | |||
flush privileges; | |||
</source> | |||
[[Category:Linux/Unix]] | [[Category:Linux/Unix]] |
2015年8月28日 (五) 01:57的版本
MariaDB官方提供了不同Linux发行版的repository,提供了安装源配置工具。下面是CentOS6 x64,安装10.0
# MariaDB 10.0 CentOS repository list - created 2015-08-28 01:32 UTC # http://mariadb.org/mariadb/repositories/ [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.0/centos6-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1
安装
yum install MariaDB-server MariaDB-client
安装完后修改默认端口
cd /etc/my.cnf.d
vim server.conf
[mysqld]
port=3307
修改root用户密码
mysqladmin -uroot -p password
创建一个数据库
create database js_huanan_db default charset utf8 collate utf8_general_ci;
use js_huanan_db;
create user js identified by '123456';
grant all on js_huanan_db.* to 'js'@'%';
flush privileges;