{"id":70,"date":"2007-03-18T12:55:08","date_gmt":"2007-03-18T17:55:08","guid":{"rendered":"http:\/\/teamtutorials.com\/uncategorized\/create-mysql-databse-with-cpanel-and-phpmyadmin"},"modified":"2007-03-18T13:00:21","modified_gmt":"2007-03-18T18:00:21","slug":"create-mysql-databse-with-cpanel-and-phpmyadmin","status":"publish","type":"post","link":"https:\/\/teamtutorials.com\/web-development-tutorials\/create-mysql-databse-with-cpanel-and-phpmyadmin","title":{"rendered":"Create MySQL Databse with cPanel and phpMyAdmin"},"content":{"rendered":"

This tutorial will show how to create and populate a basic database using cPanel and phpMyAdmin.<\/p>\n

First log in to your cPanel account and click on the icon that says MYSQL Databases
\nCreate MySQL Databse with cPanel and phpMyAdmin tutorial<\/a><\/p>\n

You should now see a screen showing your mySQL information.
\n
Create MySQL Databse with cPanel and phpMyAdmin tutorial<\/a><\/p>\n

We will need to create the database. I will call my database test. Under current Databases in the New Database field type the name of your database, test.
\n
Create MySQL Databse with cPanel and phpMyAdmin tutorial<\/a><\/p>\n

Then select create database, you will be forwarded to a screen that tells you the database was added. Click the go back button to return to management screen.
\n
Create MySQL Databse with cPanel and phpMyAdmin tutorial<\/a><\/p>\n

Now you should see your new database listed under current databases. Notice the naming convention of my database teamc42_Test. This is the (cpanel user)_(database name). The reason that my databases are named that way is because we are using shared hosting for our test site. If you are using a shared hosting package your databases will be named in a similar manor, to keep you \u2018test\u2019 database separate from another users \u2018test\u2019 database. If you are on a dedicated host the database name will probably just be \u2018test\u2019.<\/p>\n

In order to access the data we need to add a user and give the user a password. I will call me user \u2018testuser\u2019 instead of just \u2018test\u2019 to avoid confusion with the actual database. Enter the username and password and then click the \u2018Create User\u2019 button.
\n
Create MySQL Databse with cPanel and phpMyAdmin tutorial<\/a><\/p>\n

You will be forwarded to a page telling that the user was added. Click the go back button to return to the previous page.<\/p>\n

You will now see that you have a user and a database listed under \u2018Add users to your database\u2019. Now we will do just that, add the user to the database. Select the user select your test user and your database. We will give the user all permissions, so check the all permissions box. When you are finished click add user to database. You will be forwarded again and cPanel will let you know that a user was added to the database, click the go back button.<\/p>\n

When you return to the Account Maintenance Screen you will now see that you have a user added to your database, and you will also see that cPanel gives you the connection strings for Perl and PHP.
\n
Create MySQL Databse with cPanel and phpMyAdmin tutorial<\/a><\/p>\n

Our database has been created successfully, but now we need to add some sample data. To do this, scroll down to the bottom of the Account Maintenance Screen and click the phpMyAdmin Link. You should be redirected to the phpMyAdmin screen.
\n
Create MySQL Databse with cPanel and phpMyAdmin tutorial<\/a><\/p>\n

On the left you will notice that is says \u201cNo tables found in the database\u201d. We need to add a table so that we can add some data. Click on the link for your test database on the left (teamc42_Test in my case).<\/p>\n

We can now create a table in our database. I will call my table \u2018TestTable\u2019 and give the table 4 fields and then hit the go button.
\n
Create MySQL Databse with cPanel and phpMyAdmin tutorial<\/a><\/p>\n

Now we can add the information for our table fields. For the first line we will create an ID field. We will make this field the primary key. The primary key must be a unique value so we will make the ID field an auto generated integer. Enter the following information:<\/p>\n

Field: ID
\nType: Integer
\nLength\/Values: 4
\nCollation: (blank)
\nAttributes: (blank)
\nNull: Not Null
\nDefault: (blank)
\nExtra: auto_increment<\/p>\n

Then we will select the option button for primary key (pictured below).
\n
Create MySQL Databse with cPanel and phpMyAdmin tutorial<\/a><\/p>\n

Then enter the following information for the other 3 fields.<\/p>\n

Field 2
\nField: FName
\nType: Varchar
\nLength\/Values: 30
\nCollation: (blank)
\nAttributes: (blank)
\nNull: Null
\nDefault: (blank)
\nExtra: (blank)<\/p>\n

Field 3<\/p>\n

Field: LName
\nType: Varchar
\nLength\/Values: 30
\nCollation: (blank)
\nAttributes: (blank)
\nNull: Not Null (this tells mySQL that you must enter a last name)
\nDefault: (blank)
\nExtra: (blank)<\/p>\n

Field 4
\nField: PHON
\nType: Varchar
\nLength\/Values: 12
\nCollation: (blank)
\nAttributes: (blank)
\nNull: Null
\nDefault: (blank)
\nExtra: (blank)<\/p>\n

When you are finished hit the save button. You should see the following information:
\n
Create MySQL Databse with cPanel and phpMyAdmin tutorial<\/a><\/p>\n

We can now add data to the table. Click TestTable on the left menu.
\n
Create MySQL Databse with cPanel and phpMyAdmin tutorial<\/a><\/p>\n

Now click the insert button located at the top of the screen.
\n
Create MySQL Databse with cPanel and phpMyAdmin tutorial<\/a><\/p>\n

You can now enter your test data. Remember to leave the ID field blank because it will be auto generated.
\n
Create MySQL Databse with cPanel and phpMyAdmin tutorial<\/a><\/p>\n

I will enter two records and then click the go button. MySQL will tell you that the data was inserted.
\n
Create MySQL Databse with cPanel and phpMyAdmin tutorial<\/a><\/p>\n

To view the data in your table click the browse button at the top. The data should be displayed like below.
\n
Create MySQL Databse with cPanel and phpMyAdmin tutorial<\/a><\/p>\n

You have successfully populated your table. You can now close the window. The next step would be to build to access the data through a web application (I prefer PHP). If you return to the Account Maintenance screen you will see that cPanel has given yout he connection string if you would like to get started. I will continue this tutorial to show you how to access the data later on. Look for a part 2 to this tutorial soon.<\/p>\n","protected":false},"excerpt":{"rendered":"

This tutorial will show how to create and populate a basic database using cPanel and phpMyAdmin.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[18,17],"tags":[],"yoast_head":"\nCreate MySQL Databse with cPanel and phpMyAdmin<\/title>\n<meta name=\"description\" content=\"This tutorial will show how to create and populate a basic database using cPanel and phpMyAdmin.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/teamtutorials.com\/web-development-tutorials\/create-mysql-databse-with-cpanel-and-phpmyadmin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Johnathan Ward\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/teamtutorials.com\/#website\",\"url\":\"https:\/\/teamtutorials.com\/\",\"name\":\"Team Tutorials\",\"description\":\"Learn something new today\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/teamtutorials.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/teamtutorials.com\/web-development-tutorials\/create-mysql-databse-with-cpanel-and-phpmyadmin#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"http:\/\/teamtutorials.com\/wp-content\/uploads\/2007\/03\/cpanel-php-my-admin-tutorial-1.jpg\",\"contentUrl\":\"http:\/\/teamtutorials.com\/wp-content\/uploads\/2007\/03\/cpanel-php-my-admin-tutorial-1.jpg\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/teamtutorials.com\/web-development-tutorials\/create-mysql-databse-with-cpanel-and-phpmyadmin#webpage\",\"url\":\"https:\/\/teamtutorials.com\/web-development-tutorials\/create-mysql-databse-with-cpanel-and-phpmyadmin\",\"name\":\"Create MySQL Databse with cPanel and phpMyAdmin\",\"isPartOf\":{\"@id\":\"https:\/\/teamtutorials.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/teamtutorials.com\/web-development-tutorials\/create-mysql-databse-with-cpanel-and-phpmyadmin#primaryimage\"},\"datePublished\":\"2007-03-18T17:55:08+00:00\",\"dateModified\":\"2007-03-18T18:00:21+00:00\",\"author\":{\"@id\":\"https:\/\/teamtutorials.com\/#\/schema\/person\/3abea1fc71644afe035403357450b9d9\"},\"description\":\"This tutorial will show how to create and populate a basic database using cPanel and phpMyAdmin.\",\"breadcrumb\":{\"@id\":\"https:\/\/teamtutorials.com\/web-development-tutorials\/create-mysql-databse-with-cpanel-and-phpmyadmin#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/teamtutorials.com\/web-development-tutorials\/create-mysql-databse-with-cpanel-and-phpmyadmin\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/teamtutorials.com\/web-development-tutorials\/create-mysql-databse-with-cpanel-and-phpmyadmin#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/teamtutorials.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create MySQL Databse with cPanel and phpMyAdmin\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/teamtutorials.com\/#\/schema\/person\/3abea1fc71644afe035403357450b9d9\",\"name\":\"Johnathan Ward\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/teamtutorials.com\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/93d667fe5dc6df5c722e0df5eac14d40?s=96&d=mm&r=r\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/93d667fe5dc6df5c722e0df5eac14d40?s=96&d=mm&r=r\",\"caption\":\"Johnathan Ward\"},\"description\":\"Johnathan Ward is an experienced developer and consultant that writes tutorials to help other developers. In his day job, he is an IBM Watson Consultant with several years of experience deploying and customizing Watson Explorer solutions.\",\"sameAs\":[\"http:\/\/johnathanward.com\",\"https:\/\/twitter.com\/spyderman4g63\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create MySQL Databse with cPanel and phpMyAdmin","description":"This tutorial will show how to create and populate a basic database using cPanel and phpMyAdmin.","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:\/\/teamtutorials.com\/web-development-tutorials\/create-mysql-databse-with-cpanel-and-phpmyadmin","twitter_misc":{"Written by":"Johnathan Ward","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/teamtutorials.com\/#website","url":"https:\/\/teamtutorials.com\/","name":"Team Tutorials","description":"Learn something new today","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/teamtutorials.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/teamtutorials.com\/web-development-tutorials\/create-mysql-databse-with-cpanel-and-phpmyadmin#primaryimage","inLanguage":"en-US","url":"http:\/\/teamtutorials.com\/wp-content\/uploads\/2007\/03\/cpanel-php-my-admin-tutorial-1.jpg","contentUrl":"http:\/\/teamtutorials.com\/wp-content\/uploads\/2007\/03\/cpanel-php-my-admin-tutorial-1.jpg"},{"@type":"WebPage","@id":"https:\/\/teamtutorials.com\/web-development-tutorials\/create-mysql-databse-with-cpanel-and-phpmyadmin#webpage","url":"https:\/\/teamtutorials.com\/web-development-tutorials\/create-mysql-databse-with-cpanel-and-phpmyadmin","name":"Create MySQL Databse with cPanel and phpMyAdmin","isPartOf":{"@id":"https:\/\/teamtutorials.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/teamtutorials.com\/web-development-tutorials\/create-mysql-databse-with-cpanel-and-phpmyadmin#primaryimage"},"datePublished":"2007-03-18T17:55:08+00:00","dateModified":"2007-03-18T18:00:21+00:00","author":{"@id":"https:\/\/teamtutorials.com\/#\/schema\/person\/3abea1fc71644afe035403357450b9d9"},"description":"This tutorial will show how to create and populate a basic database using cPanel and phpMyAdmin.","breadcrumb":{"@id":"https:\/\/teamtutorials.com\/web-development-tutorials\/create-mysql-databse-with-cpanel-and-phpmyadmin#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/teamtutorials.com\/web-development-tutorials\/create-mysql-databse-with-cpanel-and-phpmyadmin"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/teamtutorials.com\/web-development-tutorials\/create-mysql-databse-with-cpanel-and-phpmyadmin#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/teamtutorials.com\/"},{"@type":"ListItem","position":2,"name":"Create MySQL Databse with cPanel and phpMyAdmin"}]},{"@type":"Person","@id":"https:\/\/teamtutorials.com\/#\/schema\/person\/3abea1fc71644afe035403357450b9d9","name":"Johnathan Ward","image":{"@type":"ImageObject","@id":"https:\/\/teamtutorials.com\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/93d667fe5dc6df5c722e0df5eac14d40?s=96&d=mm&r=r","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/93d667fe5dc6df5c722e0df5eac14d40?s=96&d=mm&r=r","caption":"Johnathan Ward"},"description":"Johnathan Ward is an experienced developer and consultant that writes tutorials to help other developers. In his day job, he is an IBM Watson Consultant with several years of experience deploying and customizing Watson Explorer solutions.","sameAs":["http:\/\/johnathanward.com","https:\/\/twitter.com\/spyderman4g63"]}]}},"_links":{"self":[{"href":"https:\/\/teamtutorials.com\/wp-json\/wp\/v2\/posts\/70"}],"collection":[{"href":"https:\/\/teamtutorials.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/teamtutorials.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/teamtutorials.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/teamtutorials.com\/wp-json\/wp\/v2\/comments?post=70"}],"version-history":[{"count":0,"href":"https:\/\/teamtutorials.com\/wp-json\/wp\/v2\/posts\/70\/revisions"}],"wp:attachment":[{"href":"https:\/\/teamtutorials.com\/wp-json\/wp\/v2\/media?parent=70"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/teamtutorials.com\/wp-json\/wp\/v2\/categories?post=70"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/teamtutorials.com\/wp-json\/wp\/v2\/tags?post=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}