Ubuntu系统安装MariaDB数据库的方法
安装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)]>
Ubuntu系统安装MariaDB数据库的方法