Phatha imibono ye-WordPress ngemiyalo ye-MySQL

Ago esikhathini esithile esedlule ngikukhombisile ungaphatha kanjani amasayithi e-WordPress ngemiyalo, bekungumbhalo i-perl. Kulokhu ngizokukhombisa ngqo ukuthi ungawaphatha kanjani amazwana e-WordPress ngemibuzo ye-SQL, okungukuthi, ngokusebenzisa imiyalo kukhonsoli ye-MySQL.

Into yokuqala okufanele ikhunjulwe ukuthi kumele bakwazi ukufinyelela ukuphela kwe-MySQL noma ikhonsoli, ake sithi sifinyelela iseva nge-SSH futhi ngaphakathi siyabhala:

mysql -u impande -p
Lokhu kucabanga ukuthi umsebenzisi wethu we-MySQL uyimpande, uma kungenye, mane uguqule izimpande zomsebenzisi wakho

Uma lokhu sekubhaliwe futhi kwacindezelwa Faka izocela iphasiwedi yalowo msebenzisi we-MySQL, bayayibhala, bacindezele futhi Faka futhi nge-voila, bazobe sebevele befinyelele:

mysql-ukuphela-ukufinyelela

Uma usungaphakathi kwegobolondo le-MySQL kufanele sikhombise ukuthi iyiphi i-database esizoyisebenzisa, ungabona imininingwane etholakalayo nge:

bonisa imininingwane yolwazi;
Ku-MySQL kunjalo baluleke kakhulu ukuthi imiyalo njalo iphela nge-semicolon;

Lokhu kuzokukhombisa njengoba ngishilo imininingwane etholakalayo, ake sithi lowo oyifunayo ubizwa umabhebhana, asisebenzise:

sebenzisa i-sitewordpress;

Ake sibheke ukuthi amatafula abizwa ngani:

bonisa amatafula;

Lokhu kuzositshela amagama wamatafula, kubaluleke kakhulu ngoba kufanele sibone ukuthi yiliphi igama lethebula elihlobene nokuphawula okukhona: imibono

Imvamisa ibizwa ngokuthi yi-wp_comments noma efanayo, into ebalulekile ukuthi ihlala iphela ku: imibono

Susa ukuphawula kwe-SPAM

Ngalayini wonke amazwana amakwe njengo-SPAM azosuswa:

SUSA kusuka ku-wp_comments LAPHO ukuphawula_kuvunyelwe = 'ugaxekile';
Khumbula, uma ikutshela ukuthi itafula le-wp_comments alikho kuzofanela ushintshe ama-wp_comments aye egameni eliqondile lethebula lokuphawula, igama elingenhla ngemuva kwamatafula ombukiso; wabonakala kubo

Susa wonke amazwana alinde ukulinganiswa

SUSA KUMA-wp_comments LAPHO ukuphawula_kuvunyelwe = '0';

Faka umbhalo kukho konke ukuphawula

Ake sithi sifuna ukusesha konke ukuphawula ngegama elithi "ezepolitiki" bese sikufaka esikhundleni sako "okonakele", kungaba:

BUYEKEZA i-wp_comments SET `comment_content` = REPLACE (` comment_content`, 'politicos', 'corruption');

Susa amazwana asuselwa ku-URL yesayithi yombhali

Ake sithi ngesizathu esithile sifuna ukususa konke ukuphawula kunoma imuphi umsebenzisi okuthi, ngenkathi ephawula, abalule kwifomu lokuphawula (igama, isayithi ne-imeyili) ukuthi isiza sabo bekuyi-http: //taringa.com (ukusho isibonelo) , khona-ke kuzoba kanjena:

SUSA kumazwana wp_comments LAPHO uphawula_author_url NJENGO 'http://taringa.com';

Vala imibono kuma-athikili amadala

Ngiyazi ngabantu abafuna ukuvala ukuphawula kokuthunyelwe okudala kumasayithi abo, ngakho-ke kufanele bahlele okuthunyelwe ngakunye ukuze basebenzise inketho "yokunika amandla amazwana" kulowo nalowo, lo mugqa uzoxazulula impilo yabo:

QAPHELA i-wp_posts SET comment_status = 'closed' LAPHO post_date <'2010-02-10' FUTHI post_status = 'shicilela';

Njengoba ukwazi ukubona, maphakathi nomugqa kunosuku, 2010-02-10, lokhu kusho ukuthi konke okuthunyelwe okushicilelwe futhi okunosuku lokushicilelwa ngaphansi kukaFebhuwari 10, 2010 (okungukuthi, kushicilelwe ngaphambi ) izovala imibono, akekho ozokwazi ukuphawula ngayo.

Vala imibono yazo zonke izindatshana

Uma kwenzeka ungafuni ukuvala imibono kokunye okuthunyelwe kepha kukonke, lo mugqa uzokusiza:

QAPHELA wp_posts SET comment_status = 'closed', ping_status = 'closed' LAPHO comment_status = 'open';

Uma ufuna ukuhlehlisa lokhu, shintsha kuvaliwe ukuze kuvulwe futhi okuphambene nalokho, futhi i-voila, yenza umugqa kabusha nezinguquko.

Susa amazwana enziwe ebangeni elithile lesikhathi

Ake sithi sifuna ukususa konke ukuphawula okwenziwe ngo-Ephreli 1, 2014, phakathi kuka-4: 15 ntambama no-10: 40 ebusuku, ulayini uzoba:

SUSA KUMA-wp_comments LAPHO ukubeka amazwana_date> '2014-04-01 16:15:00' FUTHI ubeke amazwana_date <= '2014-04-01 22:40:00';

Njengoba ukwazi ukubona, isikhathi sikufomethi yamahora angama-24, okungukuthi, isikhathi sempi.

Isiphetho!

Hhayi, akukho okunye engingakufaka, ngiyazi ukuthi abangaphezu koyedwa bazokuthola kuthakazelisa lokhu.

Phendula ngokucaphuna


Okuqukethwe yi-athikili kunamathela ezimisweni zethu ze izimiso zokuhlelela. Ukubika iphutha chofoza lapha.

Amazwana ayi-7, shiya okwakho

Shiya umbono wakho

Ikheli lakho le ngeke ishicilelwe. Ezidingekayo ibhalwe nge *

*

*

  1. Ubhekele imininingwane: Miguel Ángel Gatón
  2. Inhloso yedatha: Lawula Ugaxekile, ukuphathwa kwamazwana.
  3. Ukusemthethweni: Imvume yakho
  4. Ukuxhumana kwemininingwane: Imininingwane ngeke idluliselwe kubantu besithathu ngaphandle kwesibopho esisemthethweni.
  5. Isitoreji sedatha: Idatabase ebanjwe yi-Occentus Networks (EU)
  6. Amalungelo: Nganoma yisiphi isikhathi ungakhawulela, uthole futhi ususe imininingwane yakho.

  1.   @NomzamoMbatha kusho

    Ngicabanga ukuthi uvele ugqekeze i-desdelinux unganakile hahaha

  2.   phumlani kusho

    Kwenzekani ephepheni lale ndatshana? Lokhu kubonakala njengokungcola.

    1.    masisebenzise i-linux kusho

      ngomumo. kulungisiwe.
      lokhu Alejandro ...

  3.   masisebenzise i-linux kusho

    haha! yeka ukwenza udoti alejandro!
    lapho ngikubamba….

  4.   I-Yeretik kusho

    Futhi ngabe okokufundisa kwe-MySQL akunangqondo? Noma, uma okufunayo "Phatha ukuphawula kwe-wordpress kusuka kukhonsoli" okungenani yiba nomhlobiso wokwethula iskripthi se-Shell esizenzekelayo kuyo yonke le mibuzo.

    Noma kunjalo, kukhawulela umnikelo wami kokuthunyelwe (yeka into entsha!)

    Ukulayisha i-database ye-WordPress futhi uyenze ibe phansi:
    IDRIDA YEDROPHU;

    Ngiyethemba ilusizo ... 😉

    1.    KZKG ^ Gaara kusho

      Isifundo se-MySQL, ama-querys nokunye kuzoba kukhulu ... kepha, kulabo abafuna ukwenza ushintsho oluthile kumazwana we-WordPress, bekungeke kwenzeke, ngeke baqonde okuningi.

      Mayelana nodaba lokuhlobisa noma cha, woza kuWillians, uqala ngokunikela ngokuthile bese-ke ugxeka ukunikela kwabanye kulungile 😉

      Likuphi isayithi / ibhulogi yakho ewusizo emphakathini? Ngibuza ukuthi kungani, kufanele ube nokuhlobisa nesithunzi, akunjalo? ^ _ ^

      1.    URafael Castro kusho

        Ingxenye engcono kakhulu yokuthunyelwe…. osopolitiki abakhohlakele

        +1