注: mariadb-server #MariaDB数据库 mariadb # MariaDB服务器Linux下客户端 。
注:从centos7系统开始,系统中自带的mysql数据库变成了mariadb-server,mariadb-server和mysql操作上一样。mariadb-server是mysql的一个分支。
启动数据库服务[root@xuegod63 ~]# systemctl start mariadb #启动MariaDB服务。[root@xuegod63 ~]# systemctl enable mariadb #设置开启自动启动MariaDB服务。
安装完mariadb-server后,运行mysql_secure_installation去除安全隐患,[root@xuegod63 ~]# mysql_secure_installation #进入安全配置导向。
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQLSERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current,password for the root user. If you've just installed MySQL, and,you haven't set the root password yet, the password will be blank,