{"id":659,"date":"2016-11-07T12:31:58","date_gmt":"2016-11-07T12:31:58","guid":{"rendered":"http:\/\/www.fastwebhost.in\/blog\/?p=659"},"modified":"2019-01-22T12:32:14","modified_gmt":"2019-01-22T12:32:14","slug":"how-to-install-mysql-on-ubuntu-14-04","status":"publish","type":"post","link":"https:\/\/www.fastwebhost.in\/blog\/how-to-install-mysql-on-ubuntu-14-04\/","title":{"rendered":"Installing MYSQL on Ubuntu 14.04"},"content":{"rendered":"<h4>Introduction<\/h4>\n<p>MYSQL is an open-source database management system, commonly installed as part of the popular LAMP (Linux, Apache, MySQL, PHP\/Python\/Perl) stack. It uses a relational database and SQL (Structured Query Language) to manage its data. But, let us see installing MySql on Ubuntu 14.04.<\/p>\n<p>In this we learn how to install MYSQL version 5.5, 5.6 on a Ubuntu 14.04 server.<\/p>\n<h5>Step 1 \u2014 Installing MySQL<\/h5>\n<p>There are two ways to install MySQL. You can either use one of the versions included in the APT package repository by default (which are 5.5 and 5.6), or you can install the latest version (currently 5.7) by manually adding MySQL\u2019s repository first.<\/p>\n<p>To install MySQL this way, update the package index on your server and install the package with apt-get.<\/p>\n<ul>\n<li>sudo apt-get update<\/li>\n<li>sudo apt-get install mysql-server<\/li>\n<\/ul>\n<p>You\u2019ll be prompt to create a root password during the installation. Choose a secure one and make sure you remember it, because you\u2019ll need it later.<\/p>\n<h5>Installing MySQL 5.5 or 5.6<\/h5>\n<p>If you want to install MySQL 5.5 or 5.6 specifically, the process is still very straightforward. First, update the package index on your server.<\/p>\n<ul>\n<li>sudo apt-get update<\/li>\n<\/ul>\n<p>Then, to install MySQL 5.5, install the mysql-server-5.5 package.<\/p>\n<ul>\n<li>sudo apt-get install mysql-server-5.5<\/li>\n<\/ul>\n<p>To install MySQL 5.6, install the mysql-server-5.6 package instead.<\/p>\n<ul>\n<li>sudo apt-get install mysql-server-5.6<\/li>\n<\/ul>\n<p>For both options, you\u2019ll be prompt to create a root password during the installation. Below is the image for reference<\/p>\n<p>\u200b<\/p>\n<p><span><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/content.fastwebhost.in\/wp-content\/uploads\/2016\/10\/Screenshot-from-2016-09-15-09-27-11-1-300x159.png\" alt=\"Creating root password while installing MySql\" width=\"415\" height=\"220\" style=\"width: 415px;\"><\/span><\/p>\n<p>\u200b<\/p>\n<h5>Step 2 \u2014 Configuring MySQL<\/h5>\n<p>First, you\u2019ll want to run the included security script. This changes some of the less secure default options for things like remote root logins and sample users.<\/p>\n<ul>\n<li>sudo mysql_secure_installation<\/li>\n<\/ul>\n<p>You\u2019ll be prompt to enter your current password. Enter the root MySQL password set during installation:<\/p>\n<p>Enter current password for root (enter for none):<\/p>\n<p>Then, assuming you set a strong root password, go ahead and enter nat the following prompt:<\/p>\n<p>Change the root password? [Y\/n] n<\/p>\n<p>Remove anonymous users, Y:<\/p>\n<p>Remove anonymous users? [Y\/n] Y<\/p>\n<p>Disallow root logins remotely, Y:<\/p>\n<p>Disallow root login remotely? [Y\/n] Y<\/p>\n<p>Remove test database and access to it, Y:<\/p>\n<p>Remove test database and access to it? [Y\/n] Y<\/p>\n<p>And reload privilege tables, Y:<\/p>\n<p>Reload privilege tables now? [Y\/n] Y<\/p>\n<p>Step 3: Verify MySQL Installation<\/p>\n<p>You can check the version of the MySQL installation with the following command:<\/p>\n<p>MYSQL -V<\/p>\n<p>Enter the MySQL command client:<\/p>\n<p>mysql -u user name -p<\/p>\n<p>You will be prompt for root password for MYSQL:<\/p>\n<p>Enter password:<\/p>\n<p>And it will display with following message<\/p>\n<p>Welcome to the MySQL monitor. Commands end with ; or g.<\/p>\n<p>Your MySQL connection id is 47<\/p>\n<p>Server version: 5.5.40-0ubuntu0.14.04.1 (Ubuntu)<\/p>\n<p>Copyright (c) 2000, 2014, Oracle and\/or its affiliates. All rights reserved.<\/p>\n<p>Oracle is a registered trademark of Oracle Corporation and\/or its<\/p>\n<p>affiliates. Other names may be trademarks of their respective<\/p>\n<p>owners.<\/p>\n<p>Type \u2018help;\u2019 or \u2018h\u2019 for help. Type \u2018c\u2019 to clear the current input statement.<\/p>\n<p>mysql&gt;<\/p>\n<p>Exit the command line with the following command:<\/p>\n<p>exit<\/p>\n<p><strong>To stop MySQL:<\/strong><\/p>\n<p>service mysql stop<\/p>\n<p><strong>To start MySQL:<\/strong><\/p>\n<p>service mysql start<\/p>\n<p><strong>To check the status of MySQL:<\/strong><\/p>\n<p>service mysql status<\/p>\n<p><strong>To restart MySQL:<\/strong><\/p>\n<p>Service mysqld restart<\/p>\n<p>Sources:-<\/p>\n<p>http:\/\/dev.mysql.com\/doc\/mysql-apt-repo-quick-guide\/en\/<\/p>\n<p>Hope this article helps you, if any queries you can comment below.<\/p>\n<h2>The Best VPS Hosting Service in India<\/h2>\n<p>We at FastWebHos\ufeff\ufefft India provides amazing VPS hosting service. It&#8217;s a real value for money web hosting service you ever find. We support 24\/7 no matter what. Give us a try and see yourself.&nbsp;<\/p>\n<p><a href=\"http:\/\/www.fastwebhost.in\/web-hosting.html\" target=\"_blank\"><span>Buy it Now!<\/span><span>lorem ipsum dolor<\/span><\/a><b><\/b><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction MYSQL is an open-source database management system, commonly installed as part of the popular LAMP (Linux, Apache, MySQL, PHP\/Python\/Perl) stack. It uses a relational database and SQL (Structured Query Language) to manage its data. But, let us see installing MySql on Ubuntu 14.04. In this we learn how to install MYSQL version 5.5, 5.6 [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":670,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[22],"tags":[36,27],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/posts\/659"}],"collection":[{"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/comments?post=659"}],"version-history":[{"count":3,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/posts\/659\/revisions"}],"predecessor-version":[{"id":4724,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/posts\/659\/revisions\/4724"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/media\/670"}],"wp:attachment":[{"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/media?parent=659"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/categories?post=659"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/tags?post=659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}