ITPub博客

首页 > 数据库 > MySQL > install mariadb on linux

install mariadb on linux

原创 MySQL 作者:acehacker 时间:2014-05-16 14:13:01 0 删除 编辑
查看linux 版本:
cat /proc/version
Linux version 2.6.32-279.el6.x86_64 (mockbuild@c6b9.bsys.dev.centos.org) 
(gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Fri Jun 22 12:19:21 UTC 2012
390020428

1.下载安装mariadb
wget https://downloads.mariadb.org/interstitial/mariadb-10.0.10/kvm-bintar-centos5-amd64/mariadb-10.0.10-linux-x86_64.tar.gz

解压到 /usr/local 目录
cd /usr/local

2.#bin install
创建mysql 用户和用户组
groupadd mysql
useradd -g mysql mysql

3.给目录赋权:
chown -R mysql:mysql mariadb-10.0.10-linux-x86_64
建立软链接:
ln -s mariadb-10.0.10-linux-x86_64/ mysql
cd /usr/local/mysql
chown -R mysql . 
chgrp -R mysql .  

4.可以直接用脚本安装:
scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql

5.配置参数文件:
cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf /*自己可以选参数文件配置*/
#To start mysqld at boot time
 cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld  
------------------------------------------------------------------
以下是完成安装后出现的说明:
PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

'/usr/local/mysql/bin/mysqladmin' -u root password 'new-password'
'/usr/local/mysql/bin/mysqladmin' -u root -h localhost password 'new-password'

Alternatively you can run:
'/usr/local/mysql/bin/mysql_secure_installation'

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25870368/viewspace-1162673/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2013-02-07

  • 博文量
    2
  • 访问量
    4659