{"id":280,"date":"2008-07-06T11:24:00","date_gmt":"2008-07-06T05:54:00","guid":{"rendered":"http:\/\/ankitsharma.blog\/?p=280"},"modified":"2020-12-17T21:55:25","modified_gmt":"2020-12-17T16:25:25","slug":"setting-up-mysql-on-linux","status":"publish","type":"post","link":"https:\/\/www.ankitsharma.blog\/index.php\/setting-up-mysql-on-linux\/","title":{"rendered":"Setting Up MySql on Linux"},"content":{"rendered":"\n<p>Congrats ! Finally my LAMP server was installed. I have been struggling with the dude over a month and finally it was up today. Now I can experiment with my <strong>PHP <\/strong>installation and create some good web pages.<br>What I observed during the install process as I installed all components externally,  setting up Apache and PHP is quite simple and there are even many blogs and posts for them. Ultimately one faces problem setting up the <strong>MySQL server <\/strong>which is what I am going to discuss now.<\/p>\n\n\n\n<p><br>Setting up MySQL consist of 3 basic steps :<\/p>\n\n\n\n<ol><li>Install the MySQL server packages.<\/li><li>Create a new password for root.<\/li><li>Create a new database.<\/li><\/ol>\n\n\n\n<p>As far as installing MySQL packages is concerned it can be installed via software updater using the installation source DVD or they can be downloaded from MySQL website. Installation is no more an issue with all the new distros.<br>Next is the creation of <strong>root <\/strong>password for the user to log into the database.<br><strong>NOTE:<\/strong> This <strong>root <\/strong>is not the root account of your system. This is the root user for MySQL server.<br>Root password can be changed by using the following command:<\/p>\n\n\n\n<p class=\"has-text-color has-background has-normal-font-size has-very-dark-gray-color has-very-light-gray-background-color\"> mysqladmin -u root password &#8220;yourpassword&#8221;<\/p>\n\n\n\n<p>Check whether the MySQL server is running on your system or not: <\/p>\n\n\n\n<p class=\"has-background has-very-light-gray-background-color\">chkconfig mysql on<\/p>\n\n\n\n<p>If it is not running then start MySQL server:<\/p>\n\n\n\n<p class=\"has-background has-very-light-gray-background-color\"> service mysql start<\/p>\n\n\n\n<p>Now you need to create a database on this server.<\/p>\n\n\n\n<p class=\"has-background has-very-light-gray-background-color\">mysqladmin -u root -p &#8220;dbname&#8221;<\/p>\n\n\n\n<p>After this it will ask for your root password . Enter the password you just created for the root user.<\/p>\n\n\n\n<p>That&#8217;s it. Congrats your server has now been configured and ready for use.<br>Now you can log in to your database server and configure your database, execute queries.<br>To log in just type <\/p>\n\n\n\n<p class=\"has-background has-very-light-gray-background-color\">sql -u root -p &#8220;dbname&#8221;<\/p>\n\n\n\n<p>Then enter your password and you are in.<\/p>\n\n\n\n<p>For more detailed information check out the original post at <a href=\"http:\/\/www.linux.org\/lessons\/advanced\/x635.html\" target=\"_blank\" aria-label=\"undefined (opens in a new tab)\" rel=\"noreferrer noopener\">linux.org<\/a>.<strong><br><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Finally my LAMP server was installed. I have been struggling with the dude over a month and finally it was up today. Now I can experiment with my PHP installation and create some good web pages.<br \/>\nWhat I observed during the install process as I installed all components externally,  setting up Apache and PHP is quite simple and there are even many blogs and posts for them. Ultimately one faces problem setting up the MySQL server which is what I am going to discuss now.<\/p>\n","protected":false},"author":1,"featured_media":727,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,28,16],"tags":[24,29],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Setting Up MySql on Linux &#187; Ankit Sharma<\/title>\n<meta name=\"description\" content=\"How to setup MySQL rdbms database server on Linux\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.ankitsharma.blog\/index.php\/setting-up-mysql-on-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Setting Up MySql on Linux &#187; Ankit Sharma\" \/>\n<meta property=\"og:description\" content=\"How to setup MySQL rdbms database server on Linux\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.ankitsharma.blog\/index.php\/setting-up-mysql-on-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Ankit Sharma\" \/>\n<meta property=\"article:published_time\" content=\"2008-07-06T05:54:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-17T16:25:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.ankitsharma.blog\/wp-content\/uploads\/2008\/07\/mysql.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2152\" \/>\n\t<meta property=\"og:image:height\" content=\"1328\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ankit Sharma\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ankit Sharma\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.ankitsharma.blog\/index.php\/setting-up-mysql-on-linux\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.ankitsharma.blog\/index.php\/setting-up-mysql-on-linux\/\"},\"author\":{\"name\":\"Ankit Sharma\",\"@id\":\"https:\/\/www.ankitsharma.blog\/#\/schema\/person\/37b04ecf3989b3c285db5048cc61a918\"},\"headline\":\"Setting Up MySql on Linux\",\"datePublished\":\"2008-07-06T05:54:00+00:00\",\"dateModified\":\"2020-12-17T16:25:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.ankitsharma.blog\/index.php\/setting-up-mysql-on-linux\/\"},\"wordCount\":321,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.ankitsharma.blog\/#\/schema\/person\/37b04ecf3989b3c285db5048cc61a918\"},\"keywords\":[\"Linux\",\"MySQL\"],\"articleSection\":[\"Linux\",\"MySQL\",\"technology\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.ankitsharma.blog\/index.php\/setting-up-mysql-on-linux\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.ankitsharma.blog\/index.php\/setting-up-mysql-on-linux\/\",\"url\":\"https:\/\/www.ankitsharma.blog\/index.php\/setting-up-mysql-on-linux\/\",\"name\":\"Setting Up MySql on Linux &#187; Ankit Sharma\",\"isPartOf\":{\"@id\":\"https:\/\/www.ankitsharma.blog\/#website\"},\"datePublished\":\"2008-07-06T05:54:00+00:00\",\"dateModified\":\"2020-12-17T16:25:25+00:00\",\"description\":\"How to setup MySQL rdbms database server on Linux\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.ankitsharma.blog\/index.php\/setting-up-mysql-on-linux\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.ankitsharma.blog\/#website\",\"url\":\"https:\/\/www.ankitsharma.blog\/\",\"name\":\"Ankit Sharma\",\"description\":\"technology | food | cars | lifesyle | rants\",\"publisher\":{\"@id\":\"https:\/\/www.ankitsharma.blog\/#\/schema\/person\/37b04ecf3989b3c285db5048cc61a918\"},\"alternateName\":\"ankitsharma\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.ankitsharma.blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.ankitsharma.blog\/#\/schema\/person\/37b04ecf3989b3c285db5048cc61a918\",\"name\":\"Ankit Sharma\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.ankitsharma.blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.ankitsharma.blog\/wp-content\/uploads\/2021\/11\/cropped-ankitsharma-logo1.png\",\"contentUrl\":\"https:\/\/www.ankitsharma.blog\/wp-content\/uploads\/2021\/11\/cropped-ankitsharma-logo1.png\",\"width\":415,\"height\":68,\"caption\":\"Ankit Sharma\"},\"logo\":{\"@id\":\"https:\/\/www.ankitsharma.blog\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/www.ankitsharma.blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Setting Up MySql on Linux &#187; Ankit Sharma","description":"How to setup MySQL rdbms database server on Linux","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.ankitsharma.blog\/index.php\/setting-up-mysql-on-linux\/","og_locale":"en_US","og_type":"article","og_title":"Setting Up MySql on Linux &#187; Ankit Sharma","og_description":"How to setup MySQL rdbms database server on Linux","og_url":"https:\/\/www.ankitsharma.blog\/index.php\/setting-up-mysql-on-linux\/","og_site_name":"Ankit Sharma","article_published_time":"2008-07-06T05:54:00+00:00","article_modified_time":"2020-12-17T16:25:25+00:00","og_image":[{"width":2152,"height":1328,"url":"https:\/\/www.ankitsharma.blog\/wp-content\/uploads\/2008\/07\/mysql.png","type":"image\/png"}],"author":"Ankit Sharma","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ankit Sharma","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.ankitsharma.blog\/index.php\/setting-up-mysql-on-linux\/#article","isPartOf":{"@id":"https:\/\/www.ankitsharma.blog\/index.php\/setting-up-mysql-on-linux\/"},"author":{"name":"Ankit Sharma","@id":"https:\/\/www.ankitsharma.blog\/#\/schema\/person\/37b04ecf3989b3c285db5048cc61a918"},"headline":"Setting Up MySql on Linux","datePublished":"2008-07-06T05:54:00+00:00","dateModified":"2020-12-17T16:25:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.ankitsharma.blog\/index.php\/setting-up-mysql-on-linux\/"},"wordCount":321,"commentCount":0,"publisher":{"@id":"https:\/\/www.ankitsharma.blog\/#\/schema\/person\/37b04ecf3989b3c285db5048cc61a918"},"keywords":["Linux","MySQL"],"articleSection":["Linux","MySQL","technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.ankitsharma.blog\/index.php\/setting-up-mysql-on-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.ankitsharma.blog\/index.php\/setting-up-mysql-on-linux\/","url":"https:\/\/www.ankitsharma.blog\/index.php\/setting-up-mysql-on-linux\/","name":"Setting Up MySql on Linux &#187; Ankit Sharma","isPartOf":{"@id":"https:\/\/www.ankitsharma.blog\/#website"},"datePublished":"2008-07-06T05:54:00+00:00","dateModified":"2020-12-17T16:25:25+00:00","description":"How to setup MySQL rdbms database server on Linux","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.ankitsharma.blog\/index.php\/setting-up-mysql-on-linux\/"]}]},{"@type":"WebSite","@id":"https:\/\/www.ankitsharma.blog\/#website","url":"https:\/\/www.ankitsharma.blog\/","name":"Ankit Sharma","description":"technology | food | cars | lifesyle | rants","publisher":{"@id":"https:\/\/www.ankitsharma.blog\/#\/schema\/person\/37b04ecf3989b3c285db5048cc61a918"},"alternateName":"ankitsharma","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.ankitsharma.blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.ankitsharma.blog\/#\/schema\/person\/37b04ecf3989b3c285db5048cc61a918","name":"Ankit Sharma","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ankitsharma.blog\/#\/schema\/person\/image\/","url":"https:\/\/www.ankitsharma.blog\/wp-content\/uploads\/2021\/11\/cropped-ankitsharma-logo1.png","contentUrl":"https:\/\/www.ankitsharma.blog\/wp-content\/uploads\/2021\/11\/cropped-ankitsharma-logo1.png","width":415,"height":68,"caption":"Ankit Sharma"},"logo":{"@id":"https:\/\/www.ankitsharma.blog\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/www.ankitsharma.blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.ankitsharma.blog\/index.php\/wp-json\/wp\/v2\/posts\/280"}],"collection":[{"href":"https:\/\/www.ankitsharma.blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ankitsharma.blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ankitsharma.blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ankitsharma.blog\/index.php\/wp-json\/wp\/v2\/comments?post=280"}],"version-history":[{"count":10,"href":"https:\/\/www.ankitsharma.blog\/index.php\/wp-json\/wp\/v2\/posts\/280\/revisions"}],"predecessor-version":[{"id":310,"href":"https:\/\/www.ankitsharma.blog\/index.php\/wp-json\/wp\/v2\/posts\/280\/revisions\/310"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ankitsharma.blog\/index.php\/wp-json\/wp\/v2\/media\/727"}],"wp:attachment":[{"href":"https:\/\/www.ankitsharma.blog\/index.php\/wp-json\/wp\/v2\/media?parent=280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ankitsharma.blog\/index.php\/wp-json\/wp\/v2\/categories?post=280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ankitsharma.blog\/index.php\/wp-json\/wp\/v2\/tags?post=280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}