Maria DB 安装

关注一下MariaDb,发现它更新得贼快贼快的,这感觉比Mysql好多了,所以弄个来玩玩,其实安装个也贼简单到,不要下载源码包,直接下个二进制包放上去就好了^-^

1:
下一个对应Linux版本的二进制包,我的是Linux_x86的,解压tar包:
tar -zxf mariadb_linux_x86.tar.gz

2:
搬到/usr/local/mysql下:
mv mariadb_linux_x86 /usr/local/mysql

3:
更换目录的拥有者:
chown -R mysql:mysql /usr/local/mysql

4:
复制my.cnf:
cp /usr/local/mysql/support_files/my-large.cnf /usr/local/mysql/my.cnf

5:
初始化表:
/usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --data=/usr/local/mysql/data/

6:
添加到开机服务:
ln /usr/local/mysql/support_files/mysql.server /etc/init.d/mysqld
chkconfig --add mysqld

7:
初始化密码:
mysql_secure_installation
更多的错误看 /var/log/mysqld.log

posted @ 2015-06-04 22:43  菜B  阅读(324)  评论(0编辑  收藏  举报