How to Create Database using PHP and mysql
Quick Revision Summary
Q:How can we create a database using PHP and mysql? Answer : In the earlier versions of PHP we were using mysql_create_db($dbstring,$link) to create a database,but PHP5 n latest...
Interactive Practice Mode
Formulate your thoughts or take notes before revealing the model solution.
Saved automatically
Model Answer & Deep-Dive Explanation

Q:How can we create a database using PHP and mysql? Answer: In the earlier versions of PHP we were using mysql_create_db($dbstring,$link) to create a database,but PHP5 n latest versions of PHP do not support this function. Now we will have to use mysql_query(“create database databasename”); to create database. mysql_drop_db($dbname,$link) is also not supported by PHP5 n onwards versions.
If know some other ways post it in Comments
Interviewer Evaluation Points & Scoring Rubric
- 1 Explain trade-offs between memory, CPU, and network latency.
- 2 Identify failure modes, boundary conditions, and scalability bottlenecks.
- 3 Discuss caching strategies, data consistency models, and recovery.
Related Questions in General
Puzzle Based Interview Questions
Intermediate level • 799 views
My Personal first Interview experience
Advanced level • 664 views
Teaching Interview Questions
Advanced level • 604 views
Non-Technical Questions
Intermediate level • 586 views
Important Interview Questions and Answers
Advanced level • 568 views