The necessary steps to create a MySQL database using PHP are:
Establish a connection to MySQL server from your PHP script.
If the connection is successful, write a SQL query to create a database and store it in a string variable.
Execute the query.