{"id":416,"date":"2019-01-02T17:08:54","date_gmt":"2019-01-02T11:38:54","guid":{"rendered":"https:\/\/mediastroke.com\/blog\/?p=416"},"modified":"2019-01-03T11:32:09","modified_gmt":"2019-01-03T06:02:09","slug":"how-to-connect-database-on-plesk-control-panel","status":"publish","type":"post","link":"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/","title":{"rendered":"How to Connect Database on Plesk Control Panel"},"content":{"rendered":"

How to Connect Database on Plesk Control Panel<\/h1>\n

In this blog, you will learn how to start managing database using PHP and also you will learn how to use PHP to insert into Mysql database. Before we proceed to connect PHP to a database you should gain access to your hosting control panel we are using Plesk Control Panel for this purpose.<\/p>\n

1. Create a Mysql database on Plesk Control Panel:-<\/b><\/h4>\n

You have to create a database on Mysql database section. After creating a database on Plesk Control Panel it will look like given below.<\/p>\n

\"how-to-connect-database-on-plesk-control-panel\"<\/a><\/p>\n

2. Create a table:-<\/b><\/h4>\n

Visit phpMyAdmin for creating a table. We will create a table named employee for our database. You can also create a new table by clicking create table button. After entering all the details your table looks like given below.<\/p>\n

\"how-to-connect-database-on-plesk-control-panel\"<\/a><\/p>\n

3. Writing PHP code for connecting to Mysql database:-<\/b><\/h4>\n

There are two types to connect an SQL database with PHP that are MySQLi and PDO. We will go throw MySQLi where this is stands for MySQL Improved. This MySQLi introduce a new feature to the MySQL interface especially.<\/span><\/p>\n

So here is basic PHP code example which is used to establish a connection to MySQL database using MySQLi.<\/span><\/p>\n

\"how-to-connect-database-on-plesk-control-panel\"<\/a><\/p>\n

4. Successfully record inserted:-<\/b><\/h4>\n

Once you created the successful connection to the database you can see recorded value is displayed such as given below.<\/p>\n

\"how-to-connect-database-on-plesk-control-panel\"<\/a><\/p>\n

 <\/p>\n","protected":false},"excerpt":{"rendered":"

How to Connect Database on Plesk Control Panel In this blog, you will learn how to start managing database using […]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[45,46,47],"yoast_head":"\nHow to Connect Database on Plesk Control Panel -<\/title>\n<meta name=\"description\" content=\"This blog describes how to connect database using PHP script on the Plesk Control Panel, also describe how to create a database.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Connect Database on Plesk Control Panel\" \/>\n<meta property=\"og:description\" content=\"This blog describes how to connect database using PHP script on the Plesk Control Panel, also describe how to create a database.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/mediastroke\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-02T11:38:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-01-03T06:02:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2019\/01\/How-to-Connect-Database-on-Plesk-Control-Panel.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ashwini Patil\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Connect Database on Plesk Control Panel\" \/>\n<meta name=\"twitter:description\" content=\"This blog describes how to connect database using PHP script on the Plesk Control Panel, also describe how to create a database.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2019\/01\/How-to-Connect-Database-on-Plesk-Control-Panel-1.png\" \/>\n<meta name=\"twitter:creator\" content=\"@mediastrokehost\" \/>\n<meta name=\"twitter:site\" content=\"@mediastrokehost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ashwini Patil\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/\"},\"author\":{\"name\":\"Ashwini Patil\",\"@id\":\"https:\/\/mediastroke.com\/blog\/#\/schema\/person\/ea5503549640cc33f160904632fde0d3\"},\"headline\":\"How to Connect Database on Plesk Control Panel\",\"datePublished\":\"2019-01-02T11:38:54+00:00\",\"dateModified\":\"2019-01-03T06:02:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/\"},\"wordCount\":238,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2019\/01\/Screenshot-from-2019-01-02-15-19-57-1-300x140.png\",\"keywords\":[\"Plesk Control Panel\",\"Plesk Panel\",\"Plesk Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/\",\"url\":\"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/\",\"name\":\"How to Connect Database on Plesk Control Panel -\",\"isPartOf\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2019\/01\/Screenshot-from-2019-01-02-15-19-57-1-300x140.png\",\"datePublished\":\"2019-01-02T11:38:54+00:00\",\"dateModified\":\"2019-01-03T06:02:09+00:00\",\"description\":\"This blog describes how to connect database using PHP script on the Plesk Control Panel, also describe how to create a database.\",\"breadcrumb\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/#primaryimage\",\"url\":\"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2019\/01\/Screenshot-from-2019-01-02-15-19-57-1.png\",\"contentUrl\":\"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2019\/01\/Screenshot-from-2019-01-02-15-19-57-1.png\",\"width\":1282,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/mediastroke.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Connect Database on Plesk Control Panel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mediastroke.com\/blog\/#website\",\"url\":\"https:\/\/mediastroke.com\/blog\/\",\"name\":\"\",\"description\":\"Web Hosting Provider\",\"publisher\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mediastroke.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/mediastroke.com\/blog\/#organization\",\"name\":\"MediaStroke\",\"url\":\"https:\/\/mediastroke.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mediastroke.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2024\/03\/mediastroke-white-logo-blog-50h.png\",\"contentUrl\":\"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2024\/03\/mediastroke-white-logo-blog-50h.png\",\"width\":320,\"height\":50,\"caption\":\"MediaStroke\"},\"image\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/mediastroke\",\"https:\/\/x.com\/mediastrokehost\",\"https:\/\/www.linkedin.com\/company\/mediastroke-servers\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/mediastroke.com\/blog\/#\/schema\/person\/ea5503549640cc33f160904632fde0d3\",\"name\":\"Ashwini Patil\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mediastroke.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/93d588f40ad7e8565e2bbb418ca9b252?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/93d588f40ad7e8565e2bbb418ca9b252?s=96&d=mm&r=g\",\"caption\":\"Ashwini Patil\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Connect Database on Plesk Control Panel -","description":"This blog describes how to connect database using PHP script on the Plesk Control Panel, also describe how to create a database.","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:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/","og_locale":"en_US","og_type":"article","og_title":"How to Connect Database on Plesk Control Panel","og_description":"This blog describes how to connect database using PHP script on the Plesk Control Panel, also describe how to create a database.","og_url":"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/","article_publisher":"https:\/\/www.facebook.com\/mediastroke","article_published_time":"2019-01-02T11:38:54+00:00","article_modified_time":"2019-01-03T06:02:09+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2019\/01\/How-to-Connect-Database-on-Plesk-Control-Panel.png","type":"image\/png"}],"author":"Ashwini Patil","twitter_card":"summary_large_image","twitter_title":"How to Connect Database on Plesk Control Panel","twitter_description":"This blog describes how to connect database using PHP script on the Plesk Control Panel, also describe how to create a database.","twitter_image":"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2019\/01\/How-to-Connect-Database-on-Plesk-Control-Panel-1.png","twitter_creator":"@mediastrokehost","twitter_site":"@mediastrokehost","twitter_misc":{"Written by":"Ashwini Patil","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/#article","isPartOf":{"@id":"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/"},"author":{"name":"Ashwini Patil","@id":"https:\/\/mediastroke.com\/blog\/#\/schema\/person\/ea5503549640cc33f160904632fde0d3"},"headline":"How to Connect Database on Plesk Control Panel","datePublished":"2019-01-02T11:38:54+00:00","dateModified":"2019-01-03T06:02:09+00:00","mainEntityOfPage":{"@id":"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/"},"wordCount":238,"commentCount":0,"publisher":{"@id":"https:\/\/mediastroke.com\/blog\/#organization"},"image":{"@id":"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/#primaryimage"},"thumbnailUrl":"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2019\/01\/Screenshot-from-2019-01-02-15-19-57-1-300x140.png","keywords":["Plesk Control Panel","Plesk Panel","Plesk Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/","url":"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/","name":"How to Connect Database on Plesk Control Panel -","isPartOf":{"@id":"https:\/\/mediastroke.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/#primaryimage"},"image":{"@id":"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/#primaryimage"},"thumbnailUrl":"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2019\/01\/Screenshot-from-2019-01-02-15-19-57-1-300x140.png","datePublished":"2019-01-02T11:38:54+00:00","dateModified":"2019-01-03T06:02:09+00:00","description":"This blog describes how to connect database using PHP script on the Plesk Control Panel, also describe how to create a database.","breadcrumb":{"@id":"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/#primaryimage","url":"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2019\/01\/Screenshot-from-2019-01-02-15-19-57-1.png","contentUrl":"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2019\/01\/Screenshot-from-2019-01-02-15-19-57-1.png","width":1282,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/mediastroke.com\/blog\/how-to-connect-database-on-plesk-control-panel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mediastroke.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Connect Database on Plesk Control Panel"}]},{"@type":"WebSite","@id":"https:\/\/mediastroke.com\/blog\/#website","url":"https:\/\/mediastroke.com\/blog\/","name":"","description":"Web Hosting Provider","publisher":{"@id":"https:\/\/mediastroke.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mediastroke.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/mediastroke.com\/blog\/#organization","name":"MediaStroke","url":"https:\/\/mediastroke.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mediastroke.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2024\/03\/mediastroke-white-logo-blog-50h.png","contentUrl":"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2024\/03\/mediastroke-white-logo-blog-50h.png","width":320,"height":50,"caption":"MediaStroke"},"image":{"@id":"https:\/\/mediastroke.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/mediastroke","https:\/\/x.com\/mediastrokehost","https:\/\/www.linkedin.com\/company\/mediastroke-servers"]},{"@type":"Person","@id":"https:\/\/mediastroke.com\/blog\/#\/schema\/person\/ea5503549640cc33f160904632fde0d3","name":"Ashwini Patil","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mediastroke.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/93d588f40ad7e8565e2bbb418ca9b252?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/93d588f40ad7e8565e2bbb418ca9b252?s=96&d=mm&r=g","caption":"Ashwini Patil"}}]}},"_links":{"self":[{"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/posts\/416"}],"collection":[{"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/comments?post=416"}],"version-history":[{"count":3,"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/posts\/416\/revisions"}],"predecessor-version":[{"id":423,"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/posts\/416\/revisions\/423"}],"wp:attachment":[{"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/media?parent=416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/categories?post=416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/tags?post=416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}