日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢(xún)
選擇下列產(chǎn)品馬上在線(xiàn)溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問(wèn)題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷(xiāo)解決方案
Linux下安裝數(shù)據(jù)庫(kù)管理系統(tǒng)MariaDB

MariaDB數(shù)據(jù)庫(kù)管理系統(tǒng)是 MySQL 的一個(gè)分支,主要由開(kāi)源社區(qū)在維護(hù),采用GPL授權(quán)許可 MariaDB的目的是完全兼容MySQL,包括API和命令行,使之能輕松成為MySQL的代替品。

十年的辰溪網(wǎng)站建設(shè)經(jīng)驗(yàn),針對(duì)設(shè)計(jì)、前端、開(kāi)發(fā)、售后、文案、推廣等六對(duì)一服務(wù),響應(yīng)快,48小時(shí)及時(shí)工作處理。全網(wǎng)營(yíng)銷(xiāo)推廣的優(yōu)勢(shì)是能夠根據(jù)用戶(hù)設(shè)備顯示端的尺寸不同,自動(dòng)調(diào)整辰溪建站的顯示方式,使網(wǎng)站能夠適用不同顯示終端,在瀏覽器中調(diào)整網(wǎng)站的寬度,無(wú)論在任何一種瀏覽器上瀏覽網(wǎng)站,都能展現(xiàn)優(yōu)雅布局與設(shè)計(jì),從而大程度地提升瀏覽體驗(yàn)。創(chuàng)新互聯(lián)公司從事“辰溪網(wǎng)站設(shè)計(jì)”,“辰溪網(wǎng)站推廣”以來(lái),每個(gè)客戶(hù)項(xiàng)目都認(rèn)真落實(shí)執(zhí)行。

安裝

yum安裝

yum install mariadb-server mariadb -y

查看版本

[root@mysqldb ~]# rpm -q mariadb-server mariadb
mariadb-server-5.5.60-1.el7_5.x86_64
mariadb-5.5.60-1.el7_5.x86_64

設(shè)置開(kāi)機(jī)自啟動(dòng)

[root@mysqldb ~]# systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.

配置安全腳本

安裝完后,root密碼默認(rèn)是空,因此需要進(jìn)行配置安全控制程序。

配置前需要先啟動(dòng)mariadb

systemctl start mariadb

啟動(dòng)安全配置程序

[root@mysqldb ~]# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
     SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): #密碼是空,回車(chē)即可。 OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. Set root password? [Y/n] y #是否設(shè)置root密碼,這里進(jìn)行設(shè)置 New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them.  This is intended only for testing, and to make the installation go a bit smoother.  You should remove them before moving into a production environment. Remove anonymous users? [Y/n] y  #刪除匿名用戶(hù) ... Success! Normally, root should only be allowed to connect from 'localhost'.  This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] n #允許root遠(yuǎn)程登陸數(shù)據(jù)庫(kù) ... skipping. By default, MariaDB comes with a database named 'test' that anyone can access.  This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] n #不刪除test數(shù)據(jù)庫(kù),后面測(cè)試可以使用 ... skipping. Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y #重載授權(quán)表 ... Success! Cleaning up... All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

按照上面的提示進(jìn)行配置,大致就ok了。

登陸數(shù)據(jù)庫(kù)

上面已經(jīng)設(shè)置了密碼,因此不能只通過(guò)mysql就登陸數(shù)據(jù)庫(kù),后面必須加上用戶(hù)和密碼。

[root@mysqldb ~]# mysql -u root -p
Enter password: #輸出密碼,不建議放在-p后面明文顯示
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 9
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)]>

基本命令

查看數(shù)據(jù)庫(kù)

show databases;

進(jìn)入數(shù)據(jù)庫(kù)

use mysql;

查看表列表

show tables;

查看表結(jié)構(gòu)

desc user;

查看版本:

MariaDB [mysql]> select version();
+----------------+
| version()      |
+----------------+
| 5.5.60-MariaDB |
+----------------+
1 row in set (0.00 sec)

目錄結(jié)構(gòu)

目錄 說(shuō)明
/var/lib/mysql mysql數(shù)據(jù)文件存放路徑,可以自定義
/etc/my.cnf mysql配置文件地址
/usr/lib64/mysql mysql庫(kù)文件路徑
/usr/bin/mysql* mysql二進(jìn)制可執(zhí)行文件路徑
/etc/rc.d/init.d/mysqld mysql服務(wù)管理腳本地址
/var/log/mysqld.log mysql日志文件地址

網(wǎng)站標(biāo)題:Linux下安裝數(shù)據(jù)庫(kù)管理系統(tǒng)MariaDB
網(wǎng)站地址:http://www.5511xx.com/article/cdcegjg.html