How To Get Create Table Query In phpmyadmin

4 min read

How To Get Create Table Query In phpmyadmin

To start any kind of project in PHP you need to create a table in PhpMyAdmin. To create a table in PhpMyAdmin first you have to create a database. So first of all I am going to show you how to create a database in PhpMyAdmin. Please follow the below step to easily create a database PhpMyAdmin.

How to create a table using PhpMyAdmin XAMPP/WAMP server

Step 1

Start your XAMPP/WAMPP server. Next, go to the browser’s link bar and type localhost/phpmyadmin. Click enter.

Step 2

Click on the new button to open a page similar to

Here, you can enter a name and click the create buttons. A message will display confirming that the database was created successfully. I will now show you how to create a table under PhpMyAdmin the database i have created currently. Not a database? Create one first.

Step 3

You will find the page below by clicking on the database names.

There are two options to create a table: the first is to use structure, and the second is to use SQL. To create a table using SQL Query, click on the SQL button and enter your query. Click on the Go button.

How To Get Create Table Query In phpmyadmin

You will find a page similar to this if your SQL query is correct.

XAMPP allows you to create MySQL databases

The XAMPP stack software is an open-source localhost service that provides a variety of functions through the software package it contains. The XAMPP control panel is used to start/stop the software. This panel is used to test the modifications and projects offline before they are uploaded to the global internet. XAMPP provides a very important functionality: the creation of a MySQL database. This can be done using PHPMyAdmin. This article will provide a detailed explanation of phpMyAdmin as well as how to use it for creating MySQL databases with XAMPP.

phpMyAdmin

phpMyAdmin, an open-source software cost-free and free of charge, allows you to manage MySQL via the internet. It allows the user to manage and control the database using a graphic user interface called phpMyAdmin. This GUI is written in programming language. It has been trusted and used to provide a web-based MySQL administration solution.

You can access MySQL through the phpMyAdmin user interface, while still executing SQL query queries. The GUI allows a host to perform a variety of operations on the database such as creating, dropping and amending fields, tables, and indexes. You can use it to control access to the data by giving permissions and privileges. phpMyAdmin plays a crucial role in creating and managing a database.

Steps to Create MySQL Database Using XAMPP

STEP 1 Navigate directly to XAMPP in your system. Or, simply click the XAMPP icon. You can now see the Control Panel and use it to halt or initiate any module’s work.

STEP 2 Click the “Start” button to activate the Apache or MySQL module. The following screen will appear once the program starts to work:

Related Post  Unblock Websites Blocked By Administrator

STEP 3 Next, click on the button that corresponds to the MySQL Module. This automatically redirects the user to a web browser to the following address- http://localhost/phpmyadmin

STEP 4- One can see a number of tabs such as Database, SQL, User Accounts, Export, Import, Settings, etc. Click on the tab. You will see the Add option. Select the appropriate name for the input field named Database name. When choosing the name of the database, there are some things to remember:

  • You should use 64 characters or less.
  • Names should contain letters, numbers, and underscores.
  • The DB name shouldn’t begin with a number.
  • It should relate to the topic it is created.

Make sure that the database has been successfully created.

STEP 5 It’s important to create tables to organize the data. This step will be used to create tables for the newly created database. Click on the Structure> tab in the newly created Database page (Login page). The Create Table’ option will be found at the end of the table list. Fill in the name and number of columns fields and then hit the Go’ button.

STEP 6 Now we need to initialize the columns according to their type. Enter the name of each column, choose the type and enter the maximum length. In the lower right corner, click “Save“. You have created the table with initialized columns. For your database, you can create as many tables as you like.

Controlling access

You can create a password for the database to restrict the users who are allowed to modify or read it. The default settings are that the host username is root and no password is given. To increase your database’s privacy, follow these steps:

STEP 1: Click the “User accounts” tab near the top of this page.

STEP 2: Click “Edit Privileges”, under the “Actions”, option. Enter the Username=root and Hostname=localhost.

STEP 3: Click the tab to ‘Change password’. Type your password into the field. To confirm the password, type it again and click on the button “Go“. The password is now set.

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge