Verified Jobs Live
General Beginner Level ~1 min read

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.
Model Answer & Deep-Dive Explanation

database

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.