How To Create Mysql Database In Phpmyadmin
How to Create and Delete a Database in phpMyAdmin
Last updated on Nov 25,2020 18.8K Views
In order to handle the administration of MySQL over the web, phpMyAdmin is a free software tool that is written in PHP. Wide range of operations on MySQL and MariaDB are supported by phpMyAdmin. Various operations like managing databases, tables, columns, relations, indexes, users etc can be performed through its user interface and also can execute any SQL statement. Generally, the database consists of one or more tables. Special CREATE privileges are needed to create or delete a database in phpMyAdmin in the following order:
- Create a database in phpMyAdmin
- Delete a database in phpMyAdmin
Create a database in phpMyAdmin
Open localhost dashboard and click on phpMyAdmin.
Now create a database either through MySQLi or manually. In order to do it manually, click on databases and create a new one.
You can also change privileges and set up a new user login to access this database by clicking on add user account as shown in the screenshot below
You can also create a database using MySQLi procedural as shown in the example below:
// Create connection $conn = mysqli_connect($servername, $username, $password); // Check connection if (!$conn) { die("Connection failed: " . mysqli_connect_error()); } // Create database $sql = "CREATE DATABASE mydatabase"; if (mysqli_query($conn, $sql)) { echo "Database created successfully"; } else { echo "Error creating database: " . mysqli_error($conn); } mysqli_close($conn); ?>
//Output:
Database Created Successfully
Delete a database in phpMyAdmin
Go the phpMyAdmin home page and select the database which you want to delete. Now select operations and click on drop the database as shown in the screenshot below.
You can also drop the database using SQL query as shown in the screenshot below:
DROP DATABASE mydatabase;
With this, we come to an end of this How to Create and Delete a Database in phpMyAdmin article. I hope you have learned about how to create and delete a database in phpMyAdmin by manually and also by using a query.
Check out the PHP Certification Training by Edureka, a trusted online learning company with a network of more than 250,000 satisfied learners spread across the globe. It will give you a good understanding of PHP.
Got a question for us? Please mention it in the comments section of this article and I will get back to you.
Recommended videos for you
Node JS Express: Steps to Create Restful Web App
Watch Now
Microsoft Sharepoint 2013 : The Ultimate Enterprise Collaboration Platform
Watch Now
Effective Persistence Using ORM With Hibernate
Watch Now
Learn Perl-the Jewel of Scripting Languages
Watch Now
Building Application With Ruby On Rails Framework
Watch Now
Microsoft SharePoint-The Ultimate Enterprise Collaboration Platform
Watch Now
NodeJS – Communication and Round Robin Way
Watch Now
Building Web Application Using Spring Framework
Watch Now
Spring Framework : Introduction to Spring Web MVC & Spring with BigData
Watch Now
Create Restful Web Application With Node.js Express
Watch Now
MS .Net – An IntelliSense Way of Web Development
Watch Now
A Day In The Life Of A Node.js Developer
Watch Now
Hibernate-the ultimate ORM framework
Watch Now
Microsoft .NET Framework : An IntelliSense Way of Web Development
Watch Now
Portal Development and Text Searching with Hibernate
Watch Now
Recommended blogs for you
What are the differences between String, StringBuffer and StringBuilder?
Read Article
All you Need to Know about File Handling in PHP
Read Article
Everything You Need To Know About StringBuffer In Java
Read Article
How to Get Started With Your Web Developer Career?
Read Article
Everything You Need To Know About ToString In Java
Read Article
Everything You Need To Know About HTML Textarea
Read Article
What is Typecasting in Java and how does it work?
Read Article
Bootstrap Validation: How to validate a form using Bootsrap?
Read Article
Factorial Program in Java: How to find factorial of a number?
Read Article
Polymorphism in Java – How To Get Started With OOPs?
Read Article
PHP Frameworks: Everything You Need To Know About PHP Frameworks
Read Article
How To Create Mysql Database In Phpmyadmin
Source: https://www.edureka.co/blog/database-in-phpmyadmin/
Posted by: crowleytrie1968.blogspot.com
0 Response to "How To Create Mysql Database In Phpmyadmin"
Post a Comment