mysql 安装 和 配置 在 centos 7

MariaDB数据库管理系统是MySQL的一个分支,主要由开源社区在维护,采用GPL授权许可。 MariaDB完全兼容MySQL。

下面的介绍来自 mariadb 网站:

MariaDB is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google.

MariaDB turns data into structured information in a wide array of applications, ranging from banking to websites. It is an enhanced, drop-in replacement for MySQL. MariaDB is used because it is fast, scalable and robust, with a rich ecosystem of storage engines, plugins and many other tools make it very versatile for a wide variety of use cases.


安装:


#yum install  mariadb mariadb-server mariadb-devel


如果上面的不成功,可尝试


#yum install mysql mysql-server mysql-devel


查看安装情况:


#mysql --version




配置:


连接 mysql


#mysql -u root -p

这会产生错误


启动 mysql 服务


#systemctl start mariadb


自启动 mysql 服务


#systemctl enable mariadb


证实


#systemctl list-unit-files --type=service |grep mariadb


连接 mysql


mysql


创建 mysql 新用户,默认为 root 用户,密码为空


mysqladmin -u test -p 111



mysql 常用工具


show databases;

use a_database;

create database a_database_name;

show tables;

describe a_table;

select a_column from a_table;

drop a_table;

drop a_database;

quit;

exit;



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值