Chinaunix首页 | 论坛 | 博客
  • 博客访问: 123243
  • 博文数量: 22
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 187
  • 用 户 组: 普通用户
  • 注册时间: 2014-04-03 21:11
文章分类
文章存档

2015年(5)

2014年(17)

分类: Mysql/postgreSQL

2014-12-25 11:56:07

linux安装mariadb
搭建环境:
centos6.5
mariadb:mariadb-10.0.11-linux
步骤
安装cmake:
[root@localhost ~]# tar zxf cmake-2.8.8.tar.gz
[root@localhost cmake-2.8.8]# ./bootstrap
[root@localhost cmake-2.8.8]# make ; make install
安装mariadb
[root@localhost ~]# tar zxf mariadb-10.0.11-linux-x86_64.tar.gz
[root@localhost mariadb-10.0.11-linux-x86_64]# cp ./* /usr/local/mysql/
[root@localhost mysql]# ls
bin      COPYING.LESSER  data  include         lib  mysql-test  scripts  sql-bench      TODO
COPYING  CREDITS         docs  INSTALL-BINARY  man  README      share    support-files
[root@localhost mysql]# groupadd mysql
[root@localhost mysql]# useradd -g mysql mysql
[root@localhost mysql]# chown mysql:mysql -Rf  /usr/local/mysql
[root@localhost mysql]#  chmod +x -Rf /usr/local/mysql
[root@localhost mysql]# cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
[root@localhost ~]#  cp  /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
[root@localhost ~]# /usr/local/mysql/scripts/mysql_install_db –user=mysql   #初始化数据库
[root@localhost ~]# chkconfig  mysqld on
[root@localhost ~]# service  mysqld  start
[root@localhost ~]# vim /etc/profile
export PATH=/usr/local/mysql/bin:$PATH
[root@localhost ~]# source /etc/profile
[root@localhost ~]# service mysqld restart
Shutting down MySQL..                                      [确定]
Starting MySQL.                                            [确定]
然后根据需要导入数据库:
阅读(1704) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~