sql MariaDB installation contos

Installing and running the MySQL database (MariaDB)

centos platform

1. Install and run

yum install mariadb mariadb-server - 安装
systemctl start mariadb - 启动
systemctl status mariadb - 查看服务状态
netstat -nap | grep 3306 - 检查3306端口口是否绑定到MySQL服务
ps -ef | grep mysql - 检查是否有名为mysql的进程

2. Use the connection MySQL (MariaDB) password with client work tool

mysql -u root -p
use mysql;
update user set password=password('123456') where
user='root';
flush privileges;
quit

3. To view the version, database

select version();  查看版本
show databases ;  查看已有数据库

Guess you like

Origin www.cnblogs.com/ham-731/p/12121643.html