{"id":2302,"date":"2019-09-25T13:32:41","date_gmt":"2019-09-25T06:32:41","guid":{"rendered":"https:\/\/tino.vn\/?post_type=ht_kb&#038;p=2302"},"modified":"2019-09-25T13:32:41","modified_gmt":"2019-09-25T06:32:41","slug":"huong-dan-chuyen-mysql-sang-mariadb-directadmin","status":"publish","type":"ht_kb","link":"https:\/\/tino.vn\/blog\/docs\/huong-dan-chuyen-mysql-sang-mariadb-directadmin\/","title":{"rendered":"H\u01b0\u1edbng d\u1eabn chuy\u1ec3n Mysql sang Mariadb DirectAdmin"},"content":{"rendered":"<h3 id=\"B\u01b0\u1edbc_1_:_Sao_l\u01b0u_sql\"><strong>B\u01b0\u1edbc 1 : <\/strong>Sao l\u01b0u sql<\/h3>\n<p>L\u01b0u \u00fd : \u0111\u1ec3 l\u00e0m \u0111i\u1ec1u n\u00e0y b\u1ea1n n\u00ean sao l\u01b0u to\u00e0n b\u1ed9 d\u1eef li\u1ec7u c\u0169ng nh\u01b0 sao l\u01b0u l\u1ea1i .sql c\u1ee7a b\u1ea1n trong tr\u01b0\u1eddng h\u1ee3p c\u00f3 l\u1ed7i, b\u1ea1n c\u00f3 th\u1ec3 theo d\u00f5i command d\u01b0\u1edbi \u0111\u00e2y \u0111\u1ec3 th\u1ef1c hi\u1ec7n.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">cd \/usr\/local\/directadmin\/custombuild\r\n.\/build set mysql_backup yes\r\n.\/build mysql_backup\r\n#wait for the backup to complete, then rename it to a unique folder so it's not overwritten:\r\nmv mysql_backups mysql_backups.`date +%F`\r\n.\/build set mysql_backup no<\/pre>\n<h3 id=\"B\u01b0\u1edbc_2_:_Ti\u1ebfp_theo,_ch\u00fang_ta_s\u1ebd_t\u1ea1o_m\u1ed9t_b\u1ea3n_sao_c\u1ee7a_th\u01b0\"><strong>B\u01b0\u1edbc 2 <\/strong>: Ti\u1ebfp theo, ch\u00fang ta s\u1ebd t\u1ea1o m\u1ed9t b\u1ea3n sao c\u1ee7a th\u01b0<\/h3>\n<p>m\u1ee5c\u00a0<strong>\/var\/lib\/mysql<\/strong>\u00a0(<strong>\/home\/mysql<\/strong>\u00a0tr\u00ean\u00a0<strong>Debian<\/strong>\/<strong>FreeBSD<\/strong>). Ch\u00fang ta s\u1ebd d\u1eebng mysqld tr\u01b0\u1edbc, \u0111\u1ec3 tr\u00e1nh x\u1ea3y ra l\u1ed7i trong qu\u00e1 tr\u00ecnh sao ch\u00e9p.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">perl -pi -e 's\/mysqld=ON\/mysqld=OFF\/' \/usr\/local\/directadmin\/data\/admin\/services.status\r\nservice mysqld stop\r\ncd \/var\/lib\r\ncp -Rp mysql mysql.conversion_backup<\/pre>\n<h3 id=\"B\u01b0\u1edbc_3_:_\u0110\u1ea3m_b\u1ea3o_ch\u1eafc_ch\u1eafn_r\u1eb1ng_rpms_c\u1ee7a_MySQL_\u0111\u00e3_\u0111\u01b0\u1ee3c_g\u1ee1_b\u1ecf_b\u1eb1ng_l\u1ec7nh_sau\"><strong>B\u01b0\u1edbc 3 <\/strong>: \u0110\u1ea3m b\u1ea3o ch\u1eafc ch\u1eafn r\u1eb1ng rpms c\u1ee7a MySQL \u0111\u00e3 \u0111\u01b0\u1ee3c g\u1ee1 b\u1ecf b\u1eb1ng l\u1ec7nh sau<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">rpm -e `rpm -qa | grep MySQL`<\/pre>\n<h3 id=\"B\u01b0\u1edbc_4_:_Ti\u1ebfn_h\u00e0nh_c\u00e0i_\u0111\u1eb7t_MariaDB\"><strong>B\u01b0\u1edbc 4 <\/strong>: Ti\u1ebfn h\u00e0nh c\u00e0i \u0111\u1eb7t MariaDB<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">.\/build set mariadb 5.5\r\n.\/build set mysql_inst mariadb\r\n.\/build mariadb<\/pre>\n<h3 id=\"B\u01b0\u1edbc_5_:_Bi\u00ean_d\u1ecbch_l\u1ea1i_PHP\"><strong>B\u01b0\u1edbc 5 <\/strong>: Bi\u00ean d\u1ecbch l\u1ea1i PHP<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">.\/build php n<\/pre>\n<h3 id=\"B\u01b0\u1edbc_6_:_Cho_ph\u00e9p_sao_l\u01b0u_\u0111\u1ec3_c\u1eadp_nh\u1eadt_trong_t\u01b0\u01a1ng_lai_v\u00e0_theo_d\u00f5i_mysqld_m\u1ed9t_l\u1ea7n_n\u1eefa\"><strong>B\u01b0\u1edbc 6 <\/strong>: Cho ph\u00e9p sao l\u01b0u \u0111\u1ec3 c\u1eadp nh\u1eadt trong t\u01b0\u01a1ng lai v\u00e0 theo d\u00f5i mysqld m\u1ed9t l\u1ea7n n\u1eefa<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">perl -pi -e 's\/mysqld=OFF\/mysqld=ON\/' \/usr\/local\/directadmin\/data\/admin\/services.status\r\n.\/build set mysql_backup yes<\/pre>\n<p>Ki\u1ec3m tra m\u1ecdi th\u1ee9 \u0111\u1ec3 \u0111\u1ea3m b\u1ea3o n\u00f3 ch\u1ea1y ch\u00ednh x\u00e1c.<\/p>\n<p>B\u00e2y gi\u1edd b\u1ea1n \u0111\u00e3 ho\u00e0n to\u00e0n chuy\u1ec3n sang MariaDB, b\u1ea1n c\u00f3 th\u1ec3 n\u00e2ng c\u1ea5p l\u00ean 10.0 ho\u1eb7c 10.3 t\u1eeb phi\u00ean b\u1ea3n 5.5<br \/>\nCh\u00fac c\u00e1c b\u1ea1n th\u00e0nh c\u00f4ng.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>B\u01b0\u1edbc 1 : Sao l\u01b0u sql L\u01b0u \u00fd : \u0111\u1ec3 l\u00e0m \u0111i\u1ec1u n\u00e0y b\u1ea1n n\u00ean sao l\u01b0u to\u00e0n b\u1ed9 d\u1eef li\u1ec7u c\u0169ng nh\u01b0 sao l\u01b0u l\u1ea1i .sql c\u1ee7a b\u1ea1n trong tr\u01b0\u1eddng h\u1ee3p c\u00f3 l\u1ed7i, b\u1ea1n c\u00f3 th\u1ec3 theo d\u00f5i command d\u01b0\u1edbi \u0111\u00e2y \u0111\u1ec3 th\u1ef1c hi\u1ec7n. cd \/usr\/local\/directadmin\/custombuild .\/build set mysql_backup yes .\/build mysql_backup #wait for [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":16424,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"tags":[],"ht_kb_category":[23],"class_list":["post-2302","ht_kb","type-ht_kb","status-publish","format-standard","has-post-thumbnail","hentry","ht_kb_category-control-panel-direct-admin"],"_links":{"self":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/ht_kb\/2302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/ht_kb"}],"about":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/comments?post=2302"}],"version-history":[{"count":0,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/ht_kb\/2302\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media\/16424"}],"wp:attachment":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media?parent=2302"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/tags?post=2302"},{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/ht_kb_category?post=2302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}