资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

CentOS系统中如何安装和使用MariaDB数据库?-创新互联

1、查询MariaDB包

创新互联网站建设服务商,为中小企业提供成都网站设计、成都做网站服务,网站设计,绵阳服务器托管等一站式综合服务型公司,专业打造企业形象网站,让您在众多竞争对手中脱颖而出创新互联。[root@test ~]# yum list all | grep mariadb

2、安装mariaDB

[root@test ~]# yum -y install mariadb-server

3、配置mariaDB

[root@test ~]# systemctl start mariadb         #启动MariaDB [root@test ~]# systemctl enable mariadb        #设置MariaDB为开机自启动 [root@test ~]# netstat -ntlp              #查看3306端口是否成功启动 [root@test ~]# mysql_secure_installation        #首次安装需要进行数据库的配置 Enter current password for root (enter for none):  # 输入数据库超级管理员root的密码(注意不是系统root的密码),第一次进入还没有设置密码则直接回车 Set root password? [Y/n]  # 设置密码,y New password:  # 新密码 Re-enter new password:  # 再次输入密码 Remove anonymous users? [Y/n]  # 移除匿名用户, y Disallow root login remotely? [Y/n]  # 拒绝root远程登录,y Remove test database and access to it? [Y/n]  # 删除test数据库,y:删除。n:不删除,数据库中会有一个test数据库,一般不需要 Reload privilege tables now? [Y/n]  # 重新加载权限表,y。或者重启服务也许

4、登录测试mariaDB

[root@test ~]# mysql -u root -p Enter password: Welcome to the MariaDB monitor.  Commands end with ; or \g. Your MariaDB connection id is 8 Server version: 5.5.60-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> MariaDB [(none)]>quit

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


标题名称:CentOS系统中如何安装和使用MariaDB数据库?-创新互联
链接URL:http://cdkjz.cn/article/djsdsd.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

业务热线:400-028-6601 / 大客户专线   成都:13518219792   座机:028-86922220