zoukankan
html css js c++ java
CentOS7用yum安装、配置MariaDB 10
1.创建/etc/yum.repos.d/MariaDB.repo文件,这里用到了刚刚发布正式版的10.0
[html]
view plain
copy
print
?
[mariadb]
name
=
MariaDB
baseurl
=
http
://yum.mariadb.org/10.2.1/centos7-amd64/
gpgkey
=
https
://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck
=
1
2.准备好repo文件后可以使用yum来安装了
[html]
view plain
copy
print
?
# yum install MariaDB-server MariaDB-client
3.我喜欢自定义数据目录和服务端口,所以移除默认的数据目录
[html]
view plain
copy
print
?
# rm -rf /var/lib/mysql
4.创建新的数据目录
[html]
view plain
copy
print
?
# mkdir /var/data/db/mariadb
5.修改配置文件/etc/my.cnf.d/mysql-clients.cnf,重点是[client],其他的可以参考
[plain]
view plain
copy
print
?
[client]
port = 3307
socket = /var/data/db/mariadb/mysql.sock
[mysql]
no-auto-rehash
[mysqldump]
quick
max_allowed_packet = 64M
[myisamchk]
key_buffer_size = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
6.修改配置文件/etc/my.cnf.d/server.cnf,这里的性能参数来自my-large.ini文件
[plain]
view plain
copy
print
?
[mysqld]
port = 3307
datadir = /var/data/db/mariadb
socket = /var/data/db/mariadb/mysql.sock
skip-external-locking
key_buffer_size = 256M
max_allowed_packet = 64M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
thread_concurrency = 8
log-bin=mysql-bin
binlog_format=mixed
server-id = 1
7.初始化数据
[plain]
view plain
copy
print
?
# mysql_install_db --defaults-file=/etc/my.cnf --datadir=/var/data/db/mariadb/ --user=mysql
8.启动服务
[plain]
view plain
copy
print
?
# service mysql start
9.设置ROOT密码
[plain]
view plain
copy
print
?
# mysqladmin -u root password "8888888"
10.登陆mysql
[plain]
view plain
copy
print
?
# mysql -uroot -p
11.授权root远程登录
[plain]
view plain
copy
print
?
#root可从任何IP登陆,注意修改密码:'888888'
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '888888' WITH GRANT OPTION;
#root可从指定IP登陆,注意修改密码:'888888'、IP:'192.168.1.188'
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.1.188' IDENTIFIED BY '888888' WITH GRANT OPTION;
#
最后配置好权限之后不应该忘记刷新使之生效
mysql>FLUSH RIVILEGES
查看全文
相关阅读:
ASIHTTPRequest类库简介和使用说明
UIDatePickerView实现时间滚动轮播效果
UIPickerView选择控件实现选择轮播效果(转轮效果)
懒加载三大优势
UIView的自适应高度 (图像,文字)
正则表达式校验yyyymmdd
Java时间日期格式转换 转自:http://www.cnblogs.com/edwardlauxh/archive/2010/03/21/1918615.html
java.sql.SQLException: ORA-00911: 无效字符 解决方法 引自: http://blog.csdn.net/yangzhijun_cau/article/details/6064956
跨域访问
maven + eclipse + tomcat热部署 引自:http://jingpin.jikexueyuan.com/article/23068.html
原文地址:https://www.cnblogs.com/lllini/p/11955303.html
最新文章
Log4j配置和解释
Install Superset from Python3.6
CRT乱码问题
Spark 学习笔记
Oracle创建dblink
mysql日志管理
centos7.5下aria2编译安装
java基础之数据类型
mysql事务隔离级别详解
mysql事务详解
热门文章
centos6.5中mysql5.7的安装
centos6和centos7如何设置主机名
SQL语句之DML语句
SQL语句之DDL语句
SQL语句之select
UIImage 与 base64字符串 互转:
OC 格式化数据
自定义导航栏--将NavigationBar设置透明
仿淘宝顶部等待状态栏
iOS statusBar 状态栏定制
Copyright © 2011-2022 走看看