热门标签 | HotTags
当前位置:  开发笔记 > 后端 > 正文

Ubuntu系统安装MariaDB数据库的方法

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

推荐阅读
author-avatar
王文波玉龙_946
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有