作者:王文波玉龙_946 | 来源:互联网 | 2014-05-29 08:43
安装mariadb下载二进制包shellgroupaddmysqlshelluseradd-r-gmysqlmysql我输入的是shelluseradd-gmysqlmysqlshellcd/usr/localshelltarzxvf/path/to/mysql-VERSION-OS.tar.gzshellln-sfu
安装mariadb 下载二进制包
shell> groupadd
mysql
shell> useradd -r -g mysql mysql
我输入的是
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
shell> ln -s full-path-to-mysql-VERSION-OS mysql
解压我安装自己的方式解压的
(
shell> tar zxvf mysql-VERSION-OS.tar.gz
shell> mv mysql-VERSION-OS mysql
)
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
# Next command is optional
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server
/etc/init.d/mysql.server
启动/etc/init.d/mysql.server start
进入/usr/local/mysql/bin/mysql -u root -p
Enter password: //空密码
MariaDB [(none)]> show databases;
+-----------------------+
|Database
|
+-----------------------+
|infomation_schema |
|mysql
|
|test
|
+-----------------------+
3 rows in set (0.03 sec)
MariaDB [(none)]>