Centos6.5 安装 MariaDB-10.0.20-linux-x86_64.tar.gz
2015-07-31 13:30
901 查看
下载mariadb :https://downloads.mariadb.org/ 我选择mariadb-10.0.20-linux-x86_64.tar.gz这个版本
复制安装文件 /opt 目录下 并解压到当前目录 tar -zxf mariadb-10.0.20-linux-x86_64.tar.gz
把解压的文件名改为mariadb
groupadd mysql
useradd -g mysql mysql
cd /opt/mariadb
chown -R mysql:mysql /opt/mariadb/data
把mariadb/support-files下的my-medium.cnf复制到mariadb目录下,并改为my.cnf
./scripts/mysql_install_db --defaults-file=./my.cnf //初始化数据库
cp support-files/mysql.server /etc/rc.d/init.d/mysqld
chmod +x /etc/rc.d/init.d/mysqld
cp support-files/my-large.cnf /etc/my.cnf
修改 /etc/rc.d/init.d/mysqld
basedir=/opt/mariadb
datadir=/opt/mariadb/data
service mysqld start
修改环境变量 添加mariadb的bin目录 编辑/etc/profile,添加export PATH=$PATH:/opt/mariadb/bin/
修改root用户密码 ./bin/mysqladmin -u root password '123456'
登录mysql ./bin/mysql -u root -p
设置数据库权限:
MySQL [(none)]> use mysql;
MySQL [mysql]> update user set host='%' where user='root' and host='127.0.0.1';
MySQL [mysql]> grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
MySQL [mysql]> flush privileges;
复制安装文件 /opt 目录下 并解压到当前目录 tar -zxf mariadb-10.0.20-linux-x86_64.tar.gz
把解压的文件名改为mariadb
groupadd mysql
useradd -g mysql mysql
cd /opt/mariadb
chown -R mysql:mysql /opt/mariadb/data
把mariadb/support-files下的my-medium.cnf复制到mariadb目录下,并改为my.cnf
./scripts/mysql_install_db --defaults-file=./my.cnf //初始化数据库
cp support-files/mysql.server /etc/rc.d/init.d/mysqld
chmod +x /etc/rc.d/init.d/mysqld
cp support-files/my-large.cnf /etc/my.cnf
修改 /etc/rc.d/init.d/mysqld
basedir=/opt/mariadb
datadir=/opt/mariadb/data
service mysqld start
修改环境变量 添加mariadb的bin目录 编辑/etc/profile,添加export PATH=$PATH:/opt/mariadb/bin/
修改root用户密码 ./bin/mysqladmin -u root password '123456'
登录mysql ./bin/mysql -u root -p
设置数据库权限:
MySQL [(none)]> use mysql;
MySQL [mysql]> update user set host='%' where user='root' and host='127.0.0.1';
MySQL [mysql]> grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
MySQL [mysql]> flush privileges;
相关文章推荐
- MariaDB+keepalived
- MySQL/MariaDB的备份与恢复
- mariaDB存储过程与触发器
- centos7 mariadb ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)
- Mariadb开源数据库
- mariaDB 创建存储过程时报错
- Mysql/Mariadb备份
- MySQL/MariaDB的索引使用
- centos7 高速安装 mariadb(mysql)
- 编译安装mariadb-10.0.10
- [高可用]Ubuntu搭建高可用的MariaDB Galera数据库集群
- 远程连接Mariadb数据库
- mariadb galera集群配置
- CentOS 7.0搭建LAMP服务器(Apache+PHP+MariaDB)
- 【原创】CentOS 7.0下安装配置mariaDB
- MySQL/MariaDB/Percona数据库升级脚本
- centos7.0安装mariadb10.0.20
- mariadb 10.0.20安装 并安装 tokudb的引擎
- 基于mariadb的日志服务器及用loganalyzer实现日志的管理分析 推荐
- MariaDB登陆