Nruab MariaDB 10.4 ntawm CentOS7
Kev siv
Raug raws li lub vev xaib Cov Ntaub Ntawv Khoom Lag Luam Galera clusterNtxiv REPO ntawv
Siv vi lossis vim yuav hloov kho /etc/yum.repos.d/MariaDB.repo, luam cov ntsiab lus hauv qab no rau hauv ntawv, tom qab ntawv khaws thiab tawm.
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.4/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
Ua tus plahaum lag luam thiab pib ua haujlwm pabcuam
yum -y install MariaDB-server MariaDB-client
systemctl enable mariadb
systemctl start mariadb
Tsim neeg siv thiab tso cai
Tom qab kev teeb tsa tiav, peb tuaj yeem nkag rau hauv MariaDB ncaj qha rau ntawm lub tshuab no thiab tom qab ntawv tso cai. Ib qho taw tes uas xav tau tshwj xeeb rau kev tso cai ua haujlwm yog tias koj tsis tuaj yeem hloov lub localhost thaum koj siv% rau wildcard txhua qhov chaw nyob, yog li yog peb siv localhost los nkag rau lub tshuab no, peb yuav tsum tso cai dua. Tom qab kev tso cai tiav, cov kev tso cai yuav tsum ua tshiab, txwv tsis pub nws yuav siv tsis tau. Kom paub meej, thov saib cov qauv hauv qab no.
grant all privileges on *.* to 'username'@'%' identified by 'password' with grant option;
grant all privileges on *.* to 'username'@'localhost' identified by 'password' with grant option;
flush privileges;
Kev pabcuam Pov Thawj
Tom qab kev tso cai, peb siv tus lej nyiaj tshiab nkag rau MariaDB.Yog kev sib txuas tau zoo, kev teeb tsa tau ua tiav. Peb kuj yuav tsum siv lwm cov tshuab sib txuas los txuas rau ntsuas seb lub tshuab hauv cheeb tsam tsis tuaj yeem txuas rau MariaDB. Yog tias qhov txuas tsis ua tiav, xyuas seb lub foob pob hluav taws puas txwv.
mysql -u username -p password
mysql -h x.x.x.x -u username -p password