{"id":875,"date":"2017-06-25T22:59:47","date_gmt":"2017-06-25T20:59:47","guid":{"rendered":"https:\/\/dbahire.com\/?p=875"},"modified":"2018-01-14T03:18:50","modified_gmt":"2018-01-14T02:18:50","slug":"how-to-install-mysql-server-on-debian-stretch","status":"publish","type":"post","link":"https:\/\/jynus.com\/dbahire\/how-to-install-mysql-server-on-debian-stretch\/","title":{"rendered":"How to install MySQL Server on Debian Stretch"},"content":{"rendered":"<p>For the impatient:<\/p>\n<pre>\r\n# echo -e \"deb http:\/\/repo.mysql.com\/apt\/debian\/ stretch mysql-5.7\\ndeb-src http:\/\/repo.mysql.com\/apt\/debian\/ stretch mysql-5.7\" > \/etc\/apt\/sources.list.d\/mysql.list\r\n# wget -O \/tmp\/RPM-GPG-KEY-mysql https:\/\/repo.mysql.com\/RPM-GPG-KEY-mysql\r\n# apt-key add \/tmp\/RPM-GPG-KEY-mysql\r\n# apt update\r\n# apt install mysql-server\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dbahire.com\/wp-content\/uploads\/2017\/06\/debian-ying-yang.png\" alt=\"Debian Ying Yang\" title=\"To install mysql-server, roll D20. If more than 10, install mariadb-server; if more than 1, installation fails; if 1, you just upgraded production without knowing, and purge process removed your datadir\" width=\"200\" height=\"200\" class=\"alignright size-full wp-image-879\" srcset=\"https:\/\/jynus.com\/dbahire\/wp-content\/uploads\/2017\/06\/debian-ying-yang.png 300w, https:\/\/jynus.com\/dbahire\/wp-content\/uploads\/2017\/06\/debian-ying-yang-150x150.png 150w, https:\/\/jynus.com\/dbahire\/wp-content\/uploads\/2017\/06\/debian-ying-yang-270x270.png 270w, https:\/\/jynus.com\/dbahire\/wp-content\/uploads\/2017\/06\/debian-ying-yang-230x230.png 230w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/p>\n<p>In the latest stable version of Debian, if you ask to install mysql-server, you now get installed mariadb automatically, with no (evident) way of installing Oracle&#8217;s MySQL. Any major version upgrade has to be done carefully (not only for MariaDB, but also for MySQL and Postgres), and I bet that a MySQL 5.5 to MariaDB 10.1 will cause a huge confusion. Not only it will fail user expectations, I think this will cause large issues now that MariaDB has chosen to become a &#8220;hard&#8221; fork, and become incompatible in many ways with MySQL. Not only the server upgrade will cause user struggle, the connector is probably going to cause pain to users (as it has already been noticed in some of my infrastructure).<\/p>\n<p>In order to try to be helpful for those MySQL users that may be looking for help, here is how to install and setup MySQL server in Debian 9 &#8220;Stretch&#8221;, using MySQL upstream repo. The commands shown above may not be the best course of action on all cases (be careful when downloading things from then Internet), and as a disclaimer, you should read the <a href=\"https:\/\/dev.mysql.com\/doc\/mysql-apt-repo-quick-guide\/en\/\">official documentation on how to use Oracle&#8217;s MySQL apt repository<\/a> in advance. The following is a more verbose, step-by step explanation, plus some extended explanations on why I chose to recommend this method in particular (and its disadvantages).<\/p>\n<ol>\n<li>\n<p><strong>Install Oracle&#8217;s APT Repositories<\/strong><\/p>\n<p>MySQL Release Engineering team provides ready-to-use apt repositories with most of it software, including the server and many of its utilities. To enable the server repository, edit your apt sources file (or better, create a new one by executing:<\/p>\n<pre># nano \/etc\/apt\/sources.list.d\/mysql.list<\/pre>\n<p>And add the following lines:<\/p>\n<pre>\r\ndeb http:\/\/repo.mysql.com\/apt\/debian\/ stretch mysql-5.7\r\ndeb-src http:\/\/repo.mysql.com\/apt\/debian\/ stretch mysql-5.7\r\n<\/pre>\n<p>Here, I have chosen to install MySQL 5.7, but 5.6 and 8.0 (not yet stable as of June 2017) are also available for Debian stable. You can also chose to enable <code>mysql-tools<\/code> (normally here they add the connectors, mysql-router and the mysql-utilities, but right now it is empty) and <code>mysql-apt-config<\/code> the repo where the automatic apt configurator package is. While the <code>mysql-apt-config<\/code> utility is nice to have, I like to have control over my repositories manually, even if that means having to do this again in the future.<\/p>\n<p>Before starting to use the repo, you have to add the repo public key as trusted, for that I suggest:<\/p>\n<pre>\r\n# wget -O \/tmp\/RPM-GPG-KEY-mysql https:\/\/repo.mysql.com\/RPM-GPG-KEY-mysql\r\n# apt-key add \/tmp\/RPM-GPG-KEY-mysql\r\n<\/pre>\n<p>RPM and APT repos seem to share the GPG key, and that is at https:\/\/repo.mysql.com\/RPM-GPG-KEY-mysql (it is the same one that <code>mysql-apt-config<\/code> utility adds automatically on install). Not doing so will not make the rest of the install fail, but it will warn you due to the lack of a signed key.<\/p>\n<p>If you run <code>apt-key list<\/code> you will see a new trusted key for apt:<\/p>\n<pre>\r\n# apt-key list \r\n\/etc\/apt\/trusted.gpg\r\n--------------------\r\npub   dsa1024 2003-02-03 [SCA] [expires: 2019-02-17]\r\n      A4A9 4068 76FC BD3C 4567  70C8 8C71 8D3B 5072 E1F5\r\nuid           [ unknown] MySQL Release Engineering <mysql-build@oss.oracle.com>\r\n[...]\r\n<\/pre>\n<p>The advantages of using a repository rather than a one-time install is that you will get automatic updates for minor versions that may correct bugs and security issues (with minimal feature changes).<\/p>\n<\/li>\n<li>\n<p><strong>Refresh your available package list<\/strong><\/p>\n<p>Just run:<\/p>\n<pre>\r\n# apt update\r\nIgn:1 http:\/\/softlibre.unizar.es\/debian stretch InRelease\r\nHit:2 http:\/\/softlibre.unizar.es\/debian stretch-updates InRelease\r\nHit:3 http:\/\/security.debian.org\/debian-security stretch\/updates InRelease\r\nHit:4 http:\/\/softlibre.unizar.es\/debian stretch Release                  \r\nGet:5 http:\/\/repo.mysql.com\/apt\/debian stretch InRelease [14.2 kB]       \r\nGet:7 http:\/\/repo.mysql.com\/apt\/debian stretch\/mysql-5.7 Sources [870 B]\r\nGet:8 http:\/\/repo.mysql.com\/apt\/debian stretch\/mysql-5.7 amd64 Packages [5,643 B]\r\nFetched 20.7 kB in 6s (3,320 B\/s)                                           \r\nReading package lists... Done\r\nBuilding dependency tree       \r\nReading state information... Done\r\nAll packages are up to date.\r\n<\/pre>\n<p>You should see a reference to <code>repo.mysql.com<\/code> with no errors. You probably have other main repos or pending updates, that is ok.\n<\/li>\n<li>\n<p><strong>Install MySQL Server<\/strong>:<\/p>\n<pre>\r\n# apt install mysql-server\r\nReading package lists... Done\r\nBuilding dependency tree       \r\nReading state information... Done\r\nThe following additional packages will be installed:\r\n  libaio1 libatomic1 libmecab2 libnuma1 mysql-client mysql-community-client\r\n  mysql-community-server\r\nThe following NEW packages will be installed:\r\n  libaio1 libatomic1 libmecab2 libnuma1 mysql-client mysql-community-client\r\n  mysql-community-server mysql-server\r\n0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.\r\nNeed to get 36.7 MB of archives.\r\nAfter this operation, 253 MB of additional disk space will be used.\r\nDo you want to continue? [Y\/n] Y\r\nGet:1 http:\/\/repo.mysql.com\/apt\/debian stretch\/mysql-5.7 amd64 mysql-community-client amd64 5.7.18-1debian9 [8,859 kB]\r\nGet:2 http:\/\/softlibre.unizar.es\/debian stretch\/main amd64 libaio1 amd64 0.3.110-3 [9,412 B]\r\nGet:3 http:\/\/softlibre.unizar.es\/debian stretch\/main amd64 libatomic1 amd64 6.3.0-18 [8,920 B]\r\nGet:4 http:\/\/softlibre.unizar.es\/debian stretch\/main amd64 libnuma1 amd64 2.0.11-2.1 [33.3 kB]\r\nGet:5 http:\/\/softlibre.unizar.es\/debian stretch\/main amd64 libmecab2 amd64 0.996-3.1 [256 kB]\r\nGet:6 http:\/\/repo.mysql.com\/apt\/debian stretch\/mysql-5.7 amd64 mysql-client amd64 5.7.18-1debian9 [12.6 kB]\r\nGet:7 http:\/\/repo.mysql.com\/apt\/debian stretch\/mysql-5.7 amd64 mysql-community-server amd64 5.7.18-1debian9 [27.5 MB]\r\nGet:8 http:\/\/repo.mysql.com\/apt\/debian stretch\/mysql-5.7 amd64 mysql-server amd64 5.7.18-1debian9 [12.6 kB]\r\nFetched 36.7 MB in 4s (8,495 kB\/s)                 \r\nPreconfiguring packages ...\r\nSelecting previously unselected package libaio1:amd64.\r\n(Reading database ... 27516 files and directories currently installed.)\r\nPreparing to unpack ...\/0-libaio1_0.3.110-3_amd64.deb ...\r\nUnpacking libaio1:amd64 (0.3.110-3) ...\r\nSelecting previously unselected package libatomic1:amd64.\r\nPreparing to unpack ...\/1-libatomic1_6.3.0-18_amd64.deb ...\r\nUnpacking libatomic1:amd64 (6.3.0-18) ...\r\nSelecting previously unselected package libnuma1:amd64.\r\nPreparing to unpack ...\/2-libnuma1_2.0.11-2.1_amd64.deb ...\r\nUnpacking libnuma1:amd64 (2.0.11-2.1) ...\r\nSelecting previously unselected package mysql-community-client.\r\nPreparing to unpack ...\/3-mysql-community-client_5.7.18-1debian9_amd64.deb ...\r\nUnpacking mysql-community-client (5.7.18-1debian9) ...\r\nSelecting previously unselected package mysql-client.\r\nPreparing to unpack ...\/4-mysql-client_5.7.18-1debian9_amd64.deb ...\r\nUnpacking mysql-client (5.7.18-1debian9) ...\r\nSelecting previously unselected package libmecab2:amd64.\r\nPreparing to unpack ...\/5-libmecab2_0.996-3.1_amd64.deb ...\r\nUnpacking libmecab2:amd64 (0.996-3.1) ...\r\nSelecting previously unselected package mysql-community-server.\r\nPreparing to unpack ...\/6-mysql-community-server_5.7.18-1debian9_amd64.deb ...\r\nUnpacking mysql-community-server (5.7.18-1debian9) ...\r\nSelecting previously unselected package mysql-server.\r\nPreparing to unpack ...\/7-mysql-server_5.7.18-1debian9_amd64.deb ...\r\nUnpacking mysql-server (5.7.18-1debian9) ...\r\nSetting up libatomic1:amd64 (6.3.0-18) ...\r\nSetting up libnuma1:amd64 (2.0.11-2.1) ...\r\nSetting up libmecab2:amd64 (0.996-3.1) ...\r\nProcessing triggers for libc-bin (2.24-11+deb9u1) ...\r\nSetting up libaio1:amd64 (0.3.110-3) ...\r\nProcessing triggers for systemd (232-25) ...\r\nProcessing triggers for man-db (2.7.6.1-2) ...\r\nSetting up mysql-community-client (5.7.18-1debian9) ...\r\nSetting up mysql-client (5.7.18-1debian9) ...\r\nSetting up mysql-community-server (5.7.18-1debian9) ...\r\nSetting up mysql-server (5.7.18-1debian9) ...\r\nProcessing triggers for libc-bin (2.24-11+deb9u1) ...\r\n<\/pre>\n<p>If everything has gone according to plan, after asking you for permission to install it and its dependencies, you should have NOT installed mariadb-server, but the real mysql server instead. If at some stage you got an error, check your spelling or your permissions- all of the above steps should have been run with superuser or root permissions, and not as a normal user. That means using <code>sudo<\/code> before each command, <code>su -c CMD<\/code> or logging in as root in advance.<\/p>\n<p>If you do not have network on the server you are trying to install MySQL, you may want to <a href=\"https:\/\/dev.mysql.com\/downloads\/mysql\/\">download the .deb bundle for Debian9 from the download page<\/a>.<\/p>\n<\/li>\n<li>\n<p><strong>Start, stop and manage your server<\/strong><\/p>\n<p>These MySQL packages initialize and start MySQL server by default:<\/p>\n<pre>\r\n# systemctl status mysql\r\n\u25cf mysql.service - MySQL Community Server\r\n   Loaded: loaded (\/lib\/systemd\/system\/mysql.service; enabled; vendor preset:\r\n   Active: active (running) since Sun 2017-06-25 12:16:50 PDT; 31min ago\r\n  Process: 4399 ExecStart=\/usr\/sbin\/mysqld --daemonize --pid-file=\/var\/run\/my\r\n  Process: 4362 ExecStartPre=\/usr\/share\/mysql\/mysql-systemd-start pre (code=e\r\n Main PID: 4401 (mysqld)\r\n    Tasks: 27 (limit: 4915)\r\n   CGroup: \/system.slice\/mysql.service\r\n           \u2514\u25004401 \/usr\/sbin\/mysqld --daemonize --pid-file=\/var\/run\/mysqld\/mys\r\n\r\nJun 25 12:16:50 debian mysqld[4399]: 2017-06-25T19:16:50.342805Z 0 [Note] IPv\r\nJun 25 12:16:50 debian mysqld[4399]: 2017-06-25T19:16:50.345596Z 0 [Note]   -\r\nJun 25 12:16:50 debian mysqld[4399]: 2017-06-25T19:16:50.348320Z 0 [Note] Ser\r\nJun 25 12:16:50 debian mysqld[4399]: 2017-06-25T19:16:50.421804Z 0 [Note] Eve\r\nJun 25 12:16:50 debian mysqld[4399]: 2017-06-25T19:16:50.426584Z 0 [Note] \/us\r\nJun 25 12:16:50 debian mysqld[4399]: Version: '5.7.18'  socket: \/var\/run\/mysq\r\nJun 25 12:16:50 debian mysqld[4399]: 2017-06-25T19:16:50.430667Z 0 [Note] Exe\r\nJun 25 12:16:50 debian mysqld[4399]: 2017-06-25T19:16:50.430739Z 0 [Note] Beg\r\nJun 25 12:16:50 debian mysqld[4399]: 2017-06-25T19:16:50.531384Z 0 [Note] End\r\nJun 25 12:16:50 debian systemd[1]: Started MySQL Community Server\r\n<\/pre>\n<p>You can manage the service with <code>service<\/code> wrapper or with the native systemd command. Remember that it is possible that earlier os versions had a package that still used backwards <code>init.d<\/code> compatibility- it is not the case anymore. However, execution of <code>\/etc\/init.d\/mysql<\/code> will be captured and converted transparently into an equivalent <code>systemctl<\/code> command. But get accustomed to say goodbye to the horrible mysqld_safe script and its options (but also its vulnerabilities).<\/p>\n<p><pre>\r\n# systemctl restart mysql\r\n# systemctl reload mysql\r\nFailed to reload mysql.service: Job type reload is not applicable for unit mysql.service.\r\nSee system logs and 'systemctl status mysql.service' for details.\r\n# systemctl status mysql\r\n\u25cf mysql.service - MySQL Community Server\r\n   Loaded: loaded (\/lib\/systemd\/system\/mysql.service; enabled; vendor preset:\r\n   Active: active (running) since Sun 2017-06-25 12:55:43 PDT; 18s ago\r\n  Process: 4522 ExecStart=\/usr\/sbin\/mysqld --daemonize --pid-file=\/var\/run\/my\r\n  Process: 4485 ExecStartPre=\/usr\/share\/mysql\/mysql-systemd-start pre (code=e\r\n Main PID: 4524 (mysqld)\r\n    Tasks: 27 (limit: 4915)\r\n   CGroup: \/system.slice\/mysql.service\r\n           \u2514\u25004524 \/usr\/sbin\/mysqld --daemonize --pid-file=\/var\/run\/mysqld\/mys\r\n\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.670560Z 0 [Note] IPv\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.673504Z 0 [Note]   -\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.674863Z 0 [Note] Ser\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.750799Z 0 [Note] Eve\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.755752Z 0 [Note] \/us\r\nJun 25 12:55:43 debian mysqld[4522]: Version: '5.7.18'  socket: \/var\/run\/mysq\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.755892Z 0 [Note] Exe\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.755929Z 0 [Note] Beg\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.863316Z 0 [Note] End\r\nJun 25 12:55:43 debian systemd[1]: Started MySQL Community Server.\r\n\r\n# journalctl -u mysql\r\nJun 25 12:55:41 debian systemd[1]: Stopped MySQL Community Server.\r\nJun 25 12:55:41 debian systemd[1]: Starting MySQL Community Server...\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.028273Z 0 [Warning] \r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.038562Z 0 [Note] \/us\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.076552Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.080224Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.080428Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.080508Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.080651Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.080739Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.094601Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.096806Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.116165Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.201413Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.215069Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.241133Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.325375Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.329688Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.484928Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.496504Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.499790Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.506852Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.563491Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.570659Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.573444Z 0 [Note] Plu\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.603637Z 0 [Note] Inn\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.637102Z 0 [Note] Fou\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.646241Z 0 [Warning] \r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.666576Z 0 [Note] Ser\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.670560Z 0 [Note] IPv\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.673504Z 0 [Note]   -\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.674863Z 0 [Note] Ser\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.750799Z 0 [Note] Eve\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.755752Z 0 [Note] \/us\r\nJun 25 12:55:43 debian mysqld[4522]: Version: '5.7.18'  socket: \/var\/run\/mysq\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.755892Z 0 [Note] Exe\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.755929Z 0 [Note] Beg\r\nJun 25 12:55:43 debian mysqld[4522]: 2017-06-25T19:55:43.863316Z 0 [Note] End\r\nJun 25 12:55:43 debian systemd[1]: Started MySQL Community Server.\r\n<\/pre>\n<li>\n<p><strong>Use your server<\/strong><\/p>\n<p>This package sets up socket_authentication automatically for the user root, so no need to setup a password- accessing as the root unix user to the mysql root user will be directly granted:<\/p>\n<pre>\r\n# mysql -u root\r\nWelcome to the MySQL monitor.  Commands end with ; or \\g.\r\nYour MySQL connection id is 3\r\nServer version: 5.7.18 MySQL Community Server (GPL)\r\n\r\nCopyright (c) 2000, 2017, Oracle and\/or its affiliates. All rights reserved.\r\n\r\nOracle is a registered trademark of Oracle Corporation and\/or its\r\naffiliates. Other names may be trademarks of their respective\r\nowners.\r\n\r\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\r\n\r\nmysql> SELECT current_user();\r\n+----------------+\r\n| current_user() |\r\n+----------------+\r\n| root@localhost |\r\n+----------------+\r\n1 row in set (0.00 sec)\r\n<\/pre>\n<p>The default configuration binds the server to 127.0.0.1, you may want to setup your users and bind it to a public address before put it into production. Config can be found at: <code>\/etc\/mysql\/mysql.conf.d\/mysqld.cnf<\/code>.<\/p>\n<\/li>\n<\/ol>\n<p>Please use <a href=\"https:\/\/twitter.com\/jynus\">@jynus<\/a> to tell me if this was useful to you, or to tell me where I am wrong.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the impatient: # echo -e &#8220;deb http:\/\/repo.mysql.com\/apt\/debian\/ stretch mysql-5.7\\ndeb-src http:\/\/repo.mysql.com\/apt\/debian\/ stretch mysql-5.7&#8221; > \/etc\/apt\/sources.list.d\/mysql.list # wget -O \/tmp\/RPM-GPG-KEY-mysql https:\/\/repo.mysql.com\/RPM-GPG-KEY-mysql # apt-key add \/tmp\/RPM-GPG-KEY-mysql # apt update # apt install mysql-server In the latest stable version of Debian, if you<\/p>\n","protected":false},"author":1,"featured_media":879,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[501,491,42,493,455,145,503,499,489,495],"class_list":["post-875","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql","tag-apt","tag-debian","tag-install","tag-jessie","tag-mysql","tag-mysql-5-7","tag-mysql-primary","tag-mysql-server","tag-stretch","tag-upgrade"],"_links":{"self":[{"href":"https:\/\/jynus.com\/dbahire\/wp-json\/wp\/v2\/posts\/875","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jynus.com\/dbahire\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jynus.com\/dbahire\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jynus.com\/dbahire\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jynus.com\/dbahire\/wp-json\/wp\/v2\/comments?post=875"}],"version-history":[{"count":17,"href":"https:\/\/jynus.com\/dbahire\/wp-json\/wp\/v2\/posts\/875\/revisions"}],"predecessor-version":[{"id":921,"href":"https:\/\/jynus.com\/dbahire\/wp-json\/wp\/v2\/posts\/875\/revisions\/921"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jynus.com\/dbahire\/wp-json\/wp\/v2\/media\/879"}],"wp:attachment":[{"href":"https:\/\/jynus.com\/dbahire\/wp-json\/wp\/v2\/media?parent=875"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jynus.com\/dbahire\/wp-json\/wp\/v2\/categories?post=875"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jynus.com\/dbahire\/wp-json\/wp\/v2\/tags?post=875"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}