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. [确定]
然后根据需要导入数据库:
阅读(1698) | 评论(0) | 转发(0) |