Install MySQL (MariaDB)

Posted anyux

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Install MySQL (MariaDB)相关的知识,希望对你有一定的参考价值。

yum install mariadb-server mariadb
systemctl start mariadb
mysql_secure_installation

mysql_secure_installation prompts:
Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

New password: password
Re-enter new password: password
Password updated successfully!
Reloading privilege tables..
... Success!

systemctl enable mariadb

/etc/my.cnf

[client]
default-character-set=utf8
[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci

systemctl restart mariadb

create database imoocc;
grant all on imoocc.* to imoocc@'%' identified by '123456';
flush privileges;

以上是关于Install MySQL (MariaDB)的主要内容,如果未能解决你的问题,请参考以下文章

关于运行mysql_install_db命令导致sudo systemctl start /restart mariadb.service启动失败问题

centos7 install mariadb

[python] arch linux install mysql and use with python

为啥在虚拟机安装mysql命令报错yum install -y mariadb mariadb-server python2-PyMySQL?

auto_install_mariadb_ab.sh

MariaDB/Mysql的用法