安裝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)]>