November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Mariadb centos 7.4

Mariadb centos 7.4

vi /etc/yum.repos.d/Mariadb.repo

# MariaDB 10.1 CentOS repository list
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

yum -y install MariaDB-server MariaDB-client

systemctl start mysql.service

mysql_secure_installation

Enter current password for root (enter for none):

Set root password? [Y/n] y

New password:

Re-enter new password:

Remove anonymous users? [Y/n] y

Disallow root login remotely? [Y/n] n

Remove test database and access to it? [Y/n] y

Reload privilege tables now? [Y/n] y

firewall

firewall-cmd –state

not running?firewall

systemctl start firewalld

running

3306
firewall-cmd –zone=public –add-port=3306/tcp –permanent
firewall-cmd –reload

2. root MariaDB

Mariadb
mysql -uroot -p
use mysql;
Grant all on *.* to ‘root’@’%’ identified by ‘root@test123’ with grant option;
flush privileges;

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>