Kiyaye bayanan MySQL ɗinka ta hanyar ƙirƙirar masu amfani da izini daban

A koyaushe na kasance aboki na kyawawan halaye, fiye da haka idan suka taimaka mana wajen kiyaye tsaro na sabobinmu, aiyukanmu, ko kuma kawai bayaninmu.

Al'ada (mummunan al'ada) wanda yawancin masu gudanarwa ko masu amfani dashi shine amfani da dama tare dashi tushen ga dukkan bayanan bayanan, wato ... sun girka wani shafi ta hanyar amfani da WordPress CMS, kuma kamar yadda ake samun damar shiga bayanan (domin WP tayi amfani da uwar garken MySQL kuma tayi amfani da DB din ta) sun sanya mai amfani da uwar garken MySQL din. : tushe

Hakanan, suna girka duk wani aikace-aikacen gidan yanar gizo (tattaunawa, liƙa, dandalin tattaunawa, da sauransu) kuma suyi hakan, koyaushe suna amfani da tushen mai amfani da MySQL ...

KUSKURE !!!

Wannan kawai al'ada ce ta mutuwa.

A ce muna da waɗannan ayyuka a kan sabar:

  1. Shafuka ko alofar amfani da WordPress.
  2. Filin tallafinmu, tattaunawa, da sauransu ... gabaɗaya al'umma.
  3. An FTP cewa yana amfani da MySQL database don adana masu amfani da kalmomin shiga.
  4. Ana adana masu amfani da imel (masu amfani da kalmomin shiga) a cikin MySQL database.
  5. Wani karamin WebChat da muka girka don tattaunawa tare da wani wanda ka sani.

Kuma a cikin su duka, a cikin ayyuka 5 muna amfani da tushen mai amfani da MySQL don kowane sabis ya sami dama da adana bayanan a cikin madaidaicin bayanan sa.

Wata rana mai kyau, kowane ɗayan da yawa da ke kan yanar gizo, amma wannan ba tarko ba ne kawai, amma kuma ya mallaki wasu fa'idodi, raunin rauni, hacking, da sauransu ... ya yanke shawarar yin wani abu mai cutarwa a gare mu.

Nemo wani ɓarawo a cikin WebChat ɗin da muke amfani da shi, yana amfani da wannan kwaron, yana kulawa da samun damar fayilolin WebChat, gami da fayil ɗin sanyi na WebChat, kuma… a cikin wannan fayil ɗin, a bayyane, shine sunan mai amfani da kalmar sirri da WebChat ke amfani da su samun damar sabar MySQL, kuma tsammani menene? … Ba wani abu bane kuma ba komai bane ROOT USER!

Ta hanyar samun wannan bayanin, ta hanya mai sauƙi mai sauƙi:

  1. Share mu da / ko sata duk abin da ya shafi shafin ko tashar da muke da (WordPress).
  2. Kuna iya sharewa da / ko sata bayanai daga garemu DA daga masu amfani da mu da ke amfani da Dandalin, al'ummar da muka kirkira.
  3. Hakanan zaka iya satar sunan mai amfani da kalmar wucewa na DUK masu amfani waɗanda ke da asusun imel a kan sabarmu, tare da satar bayanan daga imel ɗinsu, kwaikwayonsu, da sauransu.
  4. Yanzu kuma a ƙarshe, zaku iya amfani da asusu akan sabarmu ta FTP, sannan ku loda duk wani fayil mai ɗauke da malware, wanda zai ba ku damar samun TOTAL da ABSOLUTE na sarrafa sabarmu.

To ... me kuke tunani? 🙂

Shin kuna ganin duk abin da zai iya faruwa kawai ta hanyar ƙirƙirar masu amfani masu zaman kansu ga kowane rumbun adana bayanan da muke dasu?

Wannan BA karin gishiri bane abokai, wannan na iya faruwa tare da sauƙin ban mamaki ... da kyau, duk abin da ake buƙata don buɗe bala'in shine ɓarna a cikin wasu aikace-aikacen gidan yanar gizon da kuka girka.

Yanzu…

Yadda ake kirkirar masu amfani da MySQL na kowane aikace-aikacen gidan yanar gizo?

Da farko dole ne mu shigar da sabar MySQL tare da mai amfani da tushen, tunda shi ne wanda ke da damar ƙirƙirar bayanai, kafa izini, ƙirƙirar masu amfani, da sauransu:

mysql -u root -p

Lokacin da suka rubuta sama kuma latsa [Shiga] za a tambaye su kalmar sirri ta mai amfani da tushen MySQL, suka rubuta shi suka danna [Shiga] kuma, nan take za a nuna muku wani abu kamar haka: Yanzu za mu ƙirƙiri tarin bayanai mai suna «sabarini":
CREATE DATABASE webchatdb;

Lura da semicolon «;»A ƙarshen layin.

A shirye, kun riga kun ƙirƙiri bayanan bayanai, yanzu bari mu ƙirƙiri mai amfani «mai amfani da yanar gizo«Tare da kalmar wucewa«kalmar wucewa":

CREATE USER 'webchatuser'@'localhost' IDENTIFIED BY 'passworddelputowebchat';

Yanzu sihiri ... za mu ba da dukkan dama (karanta da rubutu) zuwa mai amfani da yanar gizo KAwai a cikin DB sabarini:

GRANT ALL PRIVILEGES ON webchatdb.* TO 'webchatuser'@'localhost' WITH GRANT OPTION;

Kuma voila, mai amfani ya riga ya sami izini a cikin wannan rumbun adana bayanan ... yanzu abin da ya rage kawai shine sabunta izini ga MySQL, ma'ana, gaya wa MySQL ya sake karanta gatan masu amfani saboda yanzu haka mun canza su:

FLUSH PRIVILEGES ;

Na bar muku hoto: Kuma wannan ya kasance komai. Ta yin wannan ga kowane aikace-aikacen gidan yanar gizon da muke amfani da su, muna bada tabbacin cewa idan har suka sami damar keta ɗaya daga waɗannan aikace-aikacen gidan yanar gizon, sauran zasu kasance cikin aminci (aƙalla daga mahangar MySQL)

Menene kyakkyawan aiki? 😉

Ina fatan ya kasance yana da amfani a gare ku kamar yadda yake a gare ni, domin na yi ƙoƙari in bayyana shi a sauƙaƙe yadda zan iya.

gaisuwa


Abubuwan da ke cikin labarin suna bin ka'idodinmu na ka'idojin edita. Don yin rahoton kuskure danna a nan.

15 comments, bar naka

Bar tsokaci

Your email address ba za a buga.

*

*

  1. Mai alhakin bayanan: Miguel Ángel Gatón
  2. Dalilin bayanan: Gudanar da SPAM, gudanar da sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.

  1.   Martin m

    Kyakkyawan matsayi KZKG, idan ya kasance a cikin tattaunawar zan nemi danko!

    1.    KZKG ^ Gaara m

      Godiya 😀

      1.    CubaRed m

        Kalmar sirri da kuka saita don gidan yanar gizo yana da kyau, wani abu kuma da zai shafi mysql shine amfani da memorin sa

  2.   Hyuuga_Neji m

    Hehehe, na gode da tunatar dani dokokin MySQL. Yanzu bari muga ko "Na sanya wani tsaro" akan rumbun adana bayanan sabar duniya na Warcraft wanda nake dashi akan LAN dina.

  3.   mayan84 m

    ilimina game da wannan ba komai bane, amma kusan daidai yake da lokacin amfani da MySQL na Amarok?
    KIRKI DATABASE amarokdb;
    KA BAWA DUKKANIN MUTANE A kan amarokdb. * TO 'amarokuser' GANE TA 'kalmar sirri'; FIFITA GASKIYA;

    1.    KZKG ^ Gaara m

      Ban dade da amfani da Amarok ba, amma idan kayi amfani da DB shine MySQL, a ka'ida ma ya kamata yayi aiki haka.

  4.   Carlos Andres Restrepo m

    Barka dai, zai yi kyau idan ka kirkiri hanyar shiga ta yanar gizo saboda kare masu sabar yanar gizo, da yawa daga cikinsu basu da ingantaccen tsaro kuma mai gudanar da aikin nasu ba kwararre bane, kawai suna saukaka abubuwa ne a gare su, misali amfani da sinadarin symlink a cikin sabobin yana bada damar. karanta fayilolin sanyi na wasu asusun a kan wannan sabar yawancin masu gudanarwa ba su da masaniya game da wannan kuma wannan shine dalilin da ya sa lalata yanar gizo ke haɓaka

    gaisuwa

    1.    KZKG ^ Gaara m

      Hi yadda ake tafiya
      Barka da zuwa shafin 🙂

      A gaskiya ban dauki kaina a matsayin kwararre a cikin wannan lamarin ba, amma zan yi kokarin bayar da gudummawar dan karamin ilimin da na samu tsawon shekaru 🙂

      Wani abin da ba yawancin masu kula da hanyar sadarwa ke yi ba, shi ne bayar da dama ga shafuka tare da apache daban-daban, ma'ana, mai amfani da rukunin www-data (ko makamancin haka), wanda ya sha bamban da kowane shafin, kuma bi da bi keji kowane ɗayan waɗannan.

      gaisuwa

  5.   gardawa775 m

    Kyakkyawan bayani

    gaisuwa

    1.    KZKG ^ Gaara m

      Na gode

  6.   Nano m

    NA KIYAYI kallon tashar ka, haruffan bango sun dauke ni daga hankali na. Kai mahaukaci ne xD

    A waje da wannan, abin birgewa ne saboda na ga batutuwa masu ban tsoro na fitowar sabis daga waɗancan abubuwan.

    Yanzu, ba wai kawai ya dogara da wannan ba, tsaro ya ta'allaka ne kan yadda aka gina bayanan, wani malami ya bayyana mani, amma ban cika nutsuwa ba har yanzu a cikin DB ... ya kamata mu yi rikici da MongoDB = D ɗayan waɗannan kwanaki

  7.   Carlos Kanal m

    kawai hakan ya faru dani a yau tare da sabar na haya

    Na bi takunku, na shiga cikin cpanel kuma na nemi matattarar bayanan MYSQL kuma tana gaya min cewa ba ta da tsari.

    Ban san yadda ake shiga yanzu ba a ƙarƙashin tushen mai amfani
    Ni ne kawai a cikin wannan, amma karantawa anan kuna koyon abubuwa da yawa, Ina fatan kuna jagorantar ni don samun dama

    1.    KZKG ^ Gaara m

      Barka dai 🙂
      Abinda kuke dashi shine Hosting (SharedHosting) ko VPS (uwar garken kama-da-wane)?

      Idan kuna da Gida kuma ba VPS ba, to yakamata ku gani idan Gidan yanar gizonku yana da damar SSH (tuntuɓi tallafin fasaha na kamfanin da ya sayar maka da karɓar baƙon kuma ka tambaye su yadda ake samun dama ta hanyar SSH), da zarar kun shiga ta hanyar SSH, mai amfani ba zai zama tushen ba, amma dole ne ku yi amfani da mai amfani da kuka shigar lokacin shigar da wannan aikin yanar gizon.

      A zahiri naku batu ne mai rikitarwa, saboda bambance-bambancen karatu da damar da suke da ita sunada yawa, ina ba ku shawarar ku bude sabon batun a cikin dandalinmu, a can ne zai fi dacewa ku taimake ku - » http://foro.desdelinux.net

      Gaisuwa 😀

  8.   sarfaraz m

    Mai kyau,

    Na fahimci cewa kyakkyawan aiki ne kar a ba duk wata dama ga kowane mai amfani sai dai tushen. Koyaya, tunda na girka phpmyadmin an ƙirƙiri sabon mai amfani "phpmyadmin" tare da duk gata. Da alama ma'ana cewa wannan haka lamarin yake, tunda kawai sigar zane ce don gudanar da rumbun bayanai a cikin MySQL. Koyaya, Ina so in tabbatar ko yana da kyau kamar yadda yake ko kuma ya kamata in ɗan yi gyara a cikin gatan mai amfani "phpmyadmin".

    Gaisuwa da godiya!

  9.   Emmanuel m

    Madalla…
    Ina daya daga cikin wadanda suke yin komai da tushe, amma ka bude min aboki ..
    Na gode sosai…