Found in cPanel, XAMPP, and similar environments, PHPMyAdmin is powerful interface, providing a visual MySQL working experience. I use PHPMyAdmin quite often in my day job, developing a LAMP stack application, and want to share some common, everyday uses. PHPMyAdmin beginners – like me – who continuously learn through online resources such as: blog posts, videos, and how-to tutorials will benefit the most from this post. Keep reading to see how you can utilize PHPMyAdmin to carryout
CREATE TABLE commands…
If you enjoy the content written here, by all means, share this blog and your favorite post(s) with others who may benefit from or like it as well. Since coffee is my favorite drink, you can even buy me one if you would like!
The initial display for
CREATE TABLE in PHPMyAdmin looks like this:
In this section, I choose the name of the table and how many columns it will have. In this example, I specify 6 columns for the ‘walking_stats’ table. You can add in additional columns, or take them away as you progress from here if desired.
However, I’ll move forward with the process by clicking the Go button, which proceeds to the next display.
In this display, all of the columns are defined. There are 12 Headers that comprise this structured interface, each representing a different aspect of the column definition. The Header labels are:
- Null (check box)
- A.I. (check box for
- Move columns
You can see, that all columns at the very least, are defined with:
- A name
- A Data type
- A data type size/length – if applicable – (E.g.,
Notice I make the ‘day_walked’ column the
PRIAMARY KEY for the ‘walking_stats’ table via the PRIMARY drop down under the INDEX heading. I have also included a
COMMENT under the COMMENT heading for the ‘mph’ column, providing additional information about the data that particular column stores.
Just below this section are 5 additional choices:
- Table comments:
- Storage Engine
- Partition by:
I’ll keep Storage Engine: the default, InnoDB, and click the Save button, completing the
CREATE TABLE process.
And creating a table in PHPMyAdmin. Pretty simple right?
In a future post, I’ll cover populating a table with data from a CSV file. Thanks for reading!
Like what you have read? See anything incorrect? Please comment below and thanks for reading!!!
A Call To Action!
Thank you for taking the time to read this post. I truly hope you discovered something interesting and enlightening. Please share your findings here, with someone else you know who would get the same value out of it as well.
Visit the Portfolio-Projects page to see blog post/technical writing I have completed for clients.
Be sure and visit the “Best Of” page for a collection of my best blog posts.
Josh Otwell has a passion to study and grow as a SQL Developer and blogger. Other favorite activities find him with his nose buried in a good book, article, or the Linux command line. Among those, he shares a love of tabletop RPG games, reading fantasy novels, and spending time with his wife and two daughters.
Disclaimer: The examples presented in this post are hypothetical ideas of how to achieve similar types of results. They are not the utmost best solution(s). The majority, if not all, of the examples provided, is performed on a personal development/learning workstation-environment and should not be considered production quality or ready. Your particular goals and needs may vary. Use those practices that best benefit your needs and goals. Opinions are my own.