MariaDB 10.1.22编译安装(2)

2、配置MariaDB
#cd /appliction/mysql
#scripts/mysql_install_db --user=mysql --datadir=/appliction/mydata
 
复制配置文档
#cd /appliction/mysql/support-files/
#cp my-large.cnf /etc/my.cnf
创建启动脚本
# cd /appliction/mysql/support-files/
# cp mysql.server /etc/rc.d/init.d/mysqld
配置环境变量,方便直接输入mysql
# cat /etc/profile.d/mysql.sh
MYSQL_HOME=/appliction/mysql
export PATH=$MYSQL_HOME/bin:$PATH
#source /etc/profile.d/mysql.sh
启动数据库
# /etc/rc.d/init.d/mysqld start登陆数据库,不需要密码
报错rm -f /tmp/mysql.sock
# mysql
qld start
Reloading systemd:              [  OK  ]
Starting mysqld (via systemctl):      [  OK  ]
初始化数据库,此方式可以禁用空密码登陆,按照提示输入你需要的Y或者N
# mysql_secure_installation
设置mysql本地方式免密码登陆
# egrep -v "^$|#" /etc/my.cnf  (增加了红色部分
[client]
port= 3306
socket= /tmp/mysql.sock
[mysqld]
port= 3306
socket= /tmp/mysql.sock
basedir=/usr/local/mysql(安装数据库目录)
datadir=/home/mydata(数据存放目录)
skip-external-locking
key_buffer_size = 256M
max_allowed_packet = 1M
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
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
user = root
password = 123456
host = 127.0.0.1
[myisamchk]
key_buffer_size = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout

Ubuntu 16.04 LTS 上安装 Nginx、MariaDB 和 HHVM 运行 WordPress 

Ubuntu 16.04 Dockerfile 安装MariaDB 

Linux系统教程:如何检查MariaDB服务端版本 

Ubuntu 16.04下如何安装MariaDB 

Linux下编译安装配置MariaDB数据库的方法

CentOS系统使用yum安装MariaDB数据库

安装MariaDB与MySQL并存

Ubuntu 上如何将 MySQL 5.5 数据库迁移到 MariaDB 10 

[翻译]Ubuntu 14.04 (Trusty) Server 安装 MariaDB 

Ubuntu 14.04(Trusty)安装MariaDB 10数据库 

MariaDB 的详细介绍请点这里
MariaDB 的下载地址请点这里

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/0f3dbe34e46f5c1885cdbb59f56b5d18.html