centos7使用yum直接安裝mariadb
阿新 • • 發佈:2018-12-18
在centos7系統下,預設安裝mariadb的版本是5.5
1、安裝mariadb
1 | yum install mariadb mariadb-server |
2、啟動mariadb並設定開機自啟
12 | systemctl start mariadbsystemctl enable mariadb |
3、初始化mariadb
1 | mysql_secure_installation |
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 | NOTE:RUNNING ALL PARTS OF THISSCRIPT ISRECOMMENDED FORALL MariaDBSERVERS INPRODUCTION USE!PLEASE READ EACHSTEP CAREFULLY!Inorder tolog into MariaDB tosecure |
4、最後驗證下資料庫是否可以成功登入
1 | mysql-uroot-p |
1234567891011121314151617 | Welcome tothe MariaDB monitor.Commands endwith;or\g.Your MariaDB connection id is11Server version:5.5.60-MariaDB MariaDB ServerCopyright(c)2000,2018,Oracle,MariaDB Corporation Ab andothers.Type'help;'or'\h'forhelp.Type'\c'toclear the current input statement.MariaDB[(none)]>show databases;+--------------------+|Database|+--------------------+|information_schema||mysql||performance_schema|+--------------------+3rows inset(0.00sec) |