{"id":54550,"date":"2024-02-02T17:54:53","date_gmt":"2024-02-02T09:54:53","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=54550"},"modified":"2024-02-02T17:54:53","modified_gmt":"2024-02-02T09:54:53","slug":"debian-ubuntu-setup-mariadb10","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/debian-ubuntu-setup-mariadb10.html","title":{"rendered":"\u6559\u4f60\u5728 Debian \u548c Ubuntu \u4e0a\u5b89\u88c5 MariaDB 10"},"content":{"rendered":"
MariaDB \u662f\u6df1\u53d7\u6b22\u8fce\u7684\u6570\u636e\u5e93\u7ba1\u7406\u670d\u52a1\u5668\u8f6f\u4ef6 MySQL \u7684\u4e00\u4e2a\u81ea\u7531\u5f00\u6e90\u7684\u5206\u652f\u3002\u5b83\u7531 MySQL \u7684\u539f\u5f00\u53d1\u8005\u5728 GPLv2\uff08\u901a\u7528\u516c\u5171\u8bb8\u53ef\u8bc1 2 \u7248\uff09\u4e0b\u5f00\u53d1\uff0c\u5e76\u4fdd\u6301\u5f00\u6e90\u3002<\/p>\n
\u5b83\u88ab\u8bbe\u8ba1\u6765\u5b9e\u73b0 MySQL \u7684\u9ad8\u517c\u5bb9\u6027\u3002\u5bf9\u4e8e\u521d\u5b66\u8005\uff0c\u53ef\u4ee5\u9605\u8bfb MariaDB vs MySQL<\/a> \u6765\u4e86\u89e3\u5173\u4e8e\u5b83\u4eec\u7684\u7279\u6027\u7684\u66f4\u591a\u4fe1\u606f\u3002\u66f4\u91cd\u8981\u7684\u662f\uff0c\u5b83\u88ab\u4e00\u4e9b\u5927\u516c\u53f8\/\u7ec4\u7ec7\u4f7f\u7528\uff0c\u6bd4\u5982 Wikipedia\u3001WordPress.com \u548c Google plus \uff0c\u9664\u6b64\u4e4b\u5916\u8fd8\u6709\u66f4\u591a\u7684\u3002<\/p>\n \u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u5c06\u5411\u4f60\u4eec\u5c55\u793a\u5982\u4f55\u5728 Debian \u548c Ubuntu \u53d1\u884c\u7248\u4e2d\u5b89\u88c5 MariaDB 10.1 \u7a33\u5b9a\u7248\u3002<\/p>\n 1\u3001\u5728\u5b89\u88c5\u4e4b\u524d MariaDB \u4e4b\u524d\uff0c\u4f60\u9700\u8981\u901a\u8fc7\u4e0b\u9762\u7684\u547d\u4ee4\u5bfc\u5165\u4ed3\u5e93\u5bc6\u5319\u5e76\u83b7\u53d6 MariaDB \u4ed3\u5e93<\/p>\n \u5728 Debian 10 (Sid) \u4e0a<\/strong><\/p>\n \u5728 Debian 9 (Stretch) \u4e0a<\/strong><\/p>\n \u5728 Debian 8 (Jessie) \u4e0a<\/strong><\/p>\n \u5728 Debian 7 (Wheezy) \u4e0a<\/strong><\/p>\n \u5728 Ubuntu 16.10 (Yakkety Yak) \u4e0a<\/strong><\/p>\n \u5728 Ubuntu 16.04 (Xenial Xerus) \u4e0a<\/strong><\/p>\n \u5728 Ubuntu 14.04 (Trusty) \u4e0a<\/strong><\/p>\n 2\u3001 \u7136\u540e\uff0c\u66f4\u65b0\u7cfb\u7edf\u5b89\u88c5\u5305\u5217\u8868\uff0c\u5e76\u50cf\u4e0b\u9762\u8fd9\u6837\u5b89\u88c5 MariaDB \u670d\u52a1\u5668\uff1a<\/p>\n \u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u5c06\u4f1a\u8bf7\u6c42\u4f60\u914d\u7f6e MariaDB \u670d\u52a1\u5668\uff1b\u5728\u4e0b\u9762\u7684\u9875\u9762\u4e2d\u8bbe\u7f6e\u4e00\u4e2a\u5b89\u5168\u7684 root \u7528\u6237\u5bc6\u7801\uff1a<\/p>\n <\/p>\n \u4e3a MariaDB \u8bbe\u7f6e\u65b0\u7684 Root \u5bc6\u7801<\/em><\/p>\n \u518d\u6b21\u8f93\u5165\u5bc6\u7801\u5e76\u6309\u4e0b\u56de\u8f66\u952e\u6765\u7ee7\u7eed\u5b89\u88c5\u3002<\/p>\n <\/p>\n \u518d\u6b21\u8f93\u5165 MariaDB \u5bc6\u7801<\/em><\/p>\n \u5f53 MariaDB \u5b89\u88c5\u5305\u5b89\u88c5\u5b8c\u6210\u4ee5\u540e\uff0c\u542f\u52a8\u6570\u636e\u5e93\u670d\u52a1\u5668\u5b88\u62a4\u8fdb\u7a0b\uff0c\u540c\u65f6\u542f\u7528\u5b83\uff0c\u4f7f\u5f97\u5728\u4e0b\u6b21\u5f00\u673a\u65f6\u5b83\u80fd\u591f\u50cf\u4e0b\u9762\u8fd9\u6837\u81ea\u52a8\u542f\u52a8\uff1a<\/p>\n <\/p>\n \u5f00\u542f MariaDB \u670d\u52a1<\/em><\/p>\n 4\u3001 \u7136\u540e\uff0c\u8fd0\u884c mysql_secure_installation \u811a\u672c\u6765\u4fdd\u62a4\u6570\u636e\u5e93\uff0c\u5728\u8fd9\u513f\u4f60\u53ef\u4ee5\uff1a<\/p>\n <\/p>\n \u4fdd\u62a4 MariaDB \u5b89\u88c5<\/em><\/p>\n 5\u3001 \u4e00\u65e6\u6570\u636e\u5e93\u670d\u52a1\u5668\u53d7\u4fdd\u62a4\u4ee5\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e0b\u9762\u7684 shell \u547d\u4ee4\u67e5\u770b\u5df2\u5b89\u88c5\u7248\u672c\u548c\u767b\u5f55 MariaDB\uff1a<\/p>\n <\/p>\n \u67e5\u770b MariaDB \u7248\u672c<\/em><\/p>\n <\/p>\n via: http:\/\/www.tecmint.com\/install-mariadb-in-ubuntu-and-debian\/<\/a><\/p>\n \u4f5c\u8005\uff1aAaron Kili<\/a> \u8bd1\u8005\uff1aucasFL<\/a> \u6821\u5bf9\uff1awxy<\/a><\/p>\n \u672c\u6587\u7531 LCTT<\/a> \u539f\u521b\u7f16\u8bd1\uff0cLinux\u4e2d\u56fd<\/a> \u8363\u8a89\u63a8\u51fa<\/p>\n \u539f\u6587\u6765\u81ea\uff1ahttps:\/\/linux.cn\/article-8283-1.html<\/a><\/p>\n$ sudo apt-get install software-properties-common\r\n$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8\r\n$ sudo add-apt-repository 'deb [arch=amd64,i386] http:\/\/www.ftp.saix.net\/DB\/mariadb\/repo\/10.1\/debian sid main'\r\n<\/pre>\n
$ sudo apt-get install software-properties-common\r\n$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8\r\n$ sudo add-apt-repository 'deb [arch=amd64] http:\/\/www.ftp.saix.net\/DB\/mariadb\/repo\/10.1\/debian stretch main'\r\n<\/pre>\n
$ sudo apt-get install software-properties-common\r\n$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db\r\n$ sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http:\/\/www.ftp.saix.net\/DB\/mariadb\/repo\/10.1\/debian jessie main'\r\n<\/pre>\n
$ sudo apt-get install python-software-properties\r\n$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db\r\n$ sudo add-apt-repository 'deb [arch=amd64,i386] http:\/\/www.ftp.saix.net\/DB\/mariadb\/repo\/10.1\/debian wheezy main'\r\n<\/pre>\n
$ sudo apt-get install software-properties-common\r\n$ sudo apt-key adv --recv-keys --keyserver hkp:\/\/keyserver.ubuntu.com:80 0xF1656F24C74CD1D8\r\n$ sudo add-apt-repository 'deb [arch=amd64,i386] http:\/\/www.ftp.saix.net\/DB\/mariadb\/repo\/10.1\/ubuntu yakkety main'\r\n<\/pre>\n
$ sudo apt-get install software-properties-common\r\n$ sudo apt-key adv --recv-keys --keyserver hkp:\/\/keyserver.ubuntu.com:80 0xF1656F24C74CD1D8\r\n$ sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http:\/\/www.ftp.saix.net\/DB\/mariadb\/repo\/10.1\/ubuntu xenial main'\r\n<\/pre>\n
$ sudo apt-get install software-properties-common\r\n$ sudo apt-key adv --recv-keys --keyserver hkp:\/\/keyserver.ubuntu.com:80 0xcbcb082a1bb943db\r\n$ sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http:\/\/www.ftp.saix.net\/DB\/mariadb\/repo\/10.1\/ubuntu trusty main'\r\n<\/pre>\n
$ sudo apt-get update\r\n$ sudo apt-get install mariadb-server\r\n<\/pre>\n
------------- On SystemD Systems -------------\r\n$ sudo systemctl start mariadb\r\n$ sudo systemctl enable mariadb\r\n$ sudo systemctl status mariadb\r\n------------- On SysVinit Systems -------------\r\n$ sudo service mysql start\r\n$ chkconfig --level 35 mysql on\r\nOR\r\n$ update-rc.d mysql defaults\r\n$ sudo service mysql status\r\n<\/pre>\n
\n
$ sudo mysql_secure_installation\r\n<\/pre>\n
$ mysql -V\r\n$ mysql -u root -p\r\n<\/pre>\n
\n\n