MySQL zuwa Maria DB: Jagorar Shige da fice cikin sauri don Debian

Lokacin da wani samfuri da yake aiki kuma yake biyan kudi, kuma yake buda ido, ya fada hannun wani kamfani wanda burinshi baya wuce neman karin kudi, duniya tana girgiza.

Ya riga ya faru da OpenOffice a lokacin kuma yanzu lokaci ne na MySQL. Qazanta zuwa Oracle a bayan babu wanda ya san abin da zai iya faruwa kuma yana da kyau a san cewa akwai wasu hanyoyi kuma musamman mafi kyau duka Mariya DB.

Ana faɗar Wikipedia:

MariaDB ne mai tsarin sarrafa bayanai samo daga MySQL con GPL lasisi. An inganta ta Michael Widenius (wanda ya kafa MySQL) da kuma al'umma masu tasowa software kyauta. Shigar da biyu injunan ajiya sabo, daya kira Aria -wanda ya maye gurbinsa da fa'idodi MISALI- da kuma wani kiran XtraDB -imakawa InnoDB. Yana da babban aiki tare da MySQL tunda yana da umarni iri ɗaya, musaya, APIs da dakunan karatu, maƙasudin kasancewa iya canza sabar ɗaya zuwa wani kai tsaye.

Don haka ba tare da ƙarin damuwa ba bari mu ga yadda za a tafi MySQL a Mariya DB.

Yana da mahimmanci a san cewa don wannan yayi aiki 100%, dole ne mu sami irin na MySQL (5.5) da Maria DB (5.5)

Yin ƙaura daga MySQL zuwa Maria DB

Ba za a iya yin wannan aikin da zafi ba. A wasu kalmomin, dole ne mu tsaya na ɗan lokaci ayyukanmu da matakan da muke gudanarwa MySQL.

# sabis na dakatar da apache2 # sabis na dakatar da nginx # sabis na dakatar da mysql

A wannan yanayin mun dakatar da Apache ko NGinx ya danganta da wacce muke amfani da ita, kuma hakika mun dakatar da MySQL.

Daga baya zamuyi ajiyar bayanan MySQL dinmu:

# mysqldump -u root -p --all-databases > mysqlbackup.sql

Kuma muna cire duk fakitin da suka danganci MySQL:

# aptitude remove mysql-server-core-5.5 mysql-server-5.5 mysql-server mysql-common mysql-client-5.5 libmysqlclient18

Yanzu dole mu girka Maria DB. Abun takaici, ba a cikin wuraren ajiye Debian ba har yanzu, amma za mu iya shigar da shi ta amfani da wuraren ajiya na kansa. Don sauran rarrabawa, kuna iya ganin umarnin nan.

Muna ƙara waɗannan zuwa fayil ɗinmu /etc/sources.list:

# MariaDB 5.5 jerin kayan ajiya - an kirkireshi 2013-08-02 13:48 UTC # http://mariadb.org/mariadb/repositories/ deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/debian wheezy babban deb-src http://ftp.osuosl.org/pub/mariadb/repo/5.5/debian wheezy main

Sannan mun sabunta kuma mun girka Maria DB:

sudo basira sabunta sudo dace-samun shigar mariadb-uwar garken

Mun fara Maria DB (idan ba ta yi ta atomatik ba) kuma duba cewa yana aiki:

# mysql -u tushen -p -Be 'nuna bayanan bayanai' Shigar da kalmar wucewa:

Wasu saitunan sun canza sosai tsakanin MySQL da MariaDB, duk da haka yana da sauƙin aiki tare. Kusan duk abin da ya canza yana da alaƙa da hanyoyin da aka maye gurbinsu, misali, maimaitawa. Dole ne kawai mu kwafa zaɓukan inganta ayyukan da muke da su a cikin fayil ɗin ku.cnf de MySQL, kuma sake saita sauran ta hannu.

Misali, waɗannan bayanan:

adireshin ɗaure = 127.0.0.1 max_connections = 10 connect_timeout = 30 wait_timeout = 600 max_allowed_packet = 16M thread_cache_size = 256 KO tsara = 16M bulk_insert_buffer_size = 16M tmp_table_size = 64M max_heap_table_size = 64M

Muna yin canje-canje masu mahimmanci kuma zamu sake farawa Maria DB.

# sabis mysql sake kunnawa Dakatar da uwar garken bayanan MariaDB: mysqld. Fara uwar garken MariaDB uwar garken bayanai: mysqld. . . Dubawa don cin hanci da rashawa, ba a rufe tsaftace ba kuma haɓaka haɓaka tebura .. # mysql -u root -p -Be 'nuna bayanan bayanai' Shigar da kalmar wucewa:

Haka ne, Mariya DB adana wannan sunan na MySQL don sake kunna sabis ɗin, don kiyaye kyakkyawan jituwa. Idan komai yayi daidai, to zamu fara sauran ayyukan:

# service apache2 fara # service nginx fara

Kuma a shirye. Idan muna so mu koma baya (wanda bana ba da shawara), kawai dai mu gudu:

# service mysql stop # apt-cire cire mariadb-server-5.5 mariadb-gama mariadb-abokin ciniki-5.5 libmariadbclient18 # dace-samu shigar mysql-server

Source: Labari da aka ɗauka kuma an gyara daga BeginLinux


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

22 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.   Mauricio m

    Kamar yadda nauyin ajiyar bayanan ya ɓace.

    1.    kari m

      Ina tsammanin ba lallai ba ne, amma godiya ga bayani. Munyi ajiyar idan har Database na yanzu ya gaza, tunda dai a ganina dukkansu suna amfani da DB iri ɗaya. Dole ne in kara karantawa kan batun.

  2.   ne ozkan m

    Fedora 19 ta riga ta zo tare da Maria ta tsohuwa, amma ba gajere ko malalaci ba na yi ƙaura zuwa aikace-aikacen gidan yanar gizo na zuwa PostgreSQL, tunda MySQL ya buge mu ƙahonin, Ina fata PostgreSQL ya kasance mai aminci aƙalla shekaru 2-3.

    1.    kari m

      ArchLinux shima ya hada da Maria DB 😀

      1.    ne ozkan m

        Kuna da Mataimakin Arch ... Ko da ina da ƙananan hakora kuma ina so in sake amfani da shi ... amma ni rago ne. 😀

  3.   3ndariago m

    Na ga yanayin tsarin ciki har da tallafi ga MariaDB kuma bisa ga abin da na karanta da alama yana matakin MySQL kuma har ma ya zarce shi ta wasu fannoni, amma tambayata ita ce: gaskiyar cewa Oracle yanzu yana bayan MySQL don ƙaura don haka ta hanyar tsanya mai gwajin lokaci da miliyoyin-amfani bd manajan?

    1.    kari m

      Gaskiyan ku. Kawai faɗin Oracle shine dalili isa ya ƙare daga MySQL. Hakanan, Maria DB shine cokalin MySQL wanda mahaliccin MySQL da Al'umma suka kiyaye. Ban san ku ba, amma aƙalla hakan yana ba ni tsaro sosai. Kuma idan muka ƙara zuwa wancan cewa daidaito yana da kyau ƙwarai, saboda ina tsammanin babu uzuri don canzawa zuwa Maria DB.

      😉

      1.    lokacin3000 m

        Kuma wannan shine dalilin da ya sa na ƙi shigar da Java akan Debian ɗina. Da kyar nake amfani da OpenJDK tare da IcedTea kuma yana aiki da abubuwan al'ajabi, kuma sun fi Java kyau.

      2.    3ndariago m

        Da kyau, mutum, na tabbata dole ne ka sami dalilan ka na ƙyamar Oracle (yana jin ƙamshin waɗanda ke sa ka ƙi Microsoft, Apple da ma Google) amma tunda Oracle bai yi min komai ba ... kuma ina tsammanin Zan baku SPARC don ranar haihuwar XD

        1.    lokacin3000 m

          Yana nufin matakin software, ba matakin hardware ba.

          1.    3ndariago m

            A'a, idan zamu ƙi, mun ƙi komai, cewa rabin matakan ba sanyi bane ... hehehehehehehe

          2.    kari m

            xDDD

  4.   st0bayan4 m

    Godiya sosai, ta hanyar, yana da kyau a sami duk sabar yanar gizo kuma a fara a lokaci guda?

    Na gode!

    1.    kari m

      Wasu mutane suna amfani da Apache azaman sabar yanar gizo da NGnix a matsayin wakili don buƙatun yanar gizo. Cikakken rikici Misali yayin amfani da Node.js, wanda ke amfani da tashar jirgin ruwa ta bayan gida wanda babu wanda ke amfani da shi kuma mai yiwuwa ISP dinka ta toshe shi 😀

  5.   lokacin3000 m

    Kyakkyawan malamin ƙaura. Hakanan, Slackware tuntuni yayi ƙaura zuwa MariaDB don kaucewa ƙarin rikici tare da MySQL.

    Da zaran yana cikin bayanan tsaro na Debian, zan sanar da shi da wuri-wuri. A yanzu haka ina tattare da darasi na akan girkawa / daidaitawa / keɓance Slackware.

  6.   jlbaina m

    Amma har yanzu kde ya dogara da mysql (akan debian) ko kuma tare da wannan ƙaura ba ta zama dole ba?

  7.   brunocascio m

    Don haka daga abin da na fahimta, duk aikace-aikacen da aka saita tare da MySQL ba lallai bane a sake saita wani abu daga ciki ba? Kawai shigar da MariaDB (kuma cire mysql) kuma kiyaye sunaye azaman mysql shin yakamata yayi aiki?

    Game da aikin, ana ambata canje-canjen injiniya.
    Shin suna yin fice tare da tsohuwar MylSam da InnoDB?

    Wani yayi kowane awo?

      1.    brunocascio m

        Na fahimci haha, Na gode!

  8.   helena_ryuu m

    Godiya mai yawa! yanzu idan ya bayyana gareni; D

  9.   Javier m

    An kasa saita kalmar sirri don mai amfani "tushen" MariaDB

    │ Kuskure ya faru yayin saita kalmar sirri don MariaDB │
    User mai amfani da gudanarwa. Wannan na iya faruwa saboda asusun tuni │
    │ yana da kalmar sirri, ko saboda matsalar sadarwa tare da MariaDB │
    │ sabar │

    Ya kamata ku duba kalmar sirrin asusun bayan shigarwar kunshin. │

    Da fatan za a karanta /usr/share/doc/mariadb-server-10.1/README.Debian file │
    │ don ƙarin bayani.

    1.    Javier m

      Na cire kayan kunshin sabar maridb
      Na cire kundin adireshi / var / lib / mysql.
      3 Sake shigar da kunshin Mariadb, Mariadb-sabar.
      systemct fara mariadb; systemctl kunna mariadb (an warware matsala)

bool (gaskiya)