I want to set up a php program that will create a MySQL database & a MySql database user for that database.
I know how to do this in phpMyadmin; I have done it a hundred times.
For reasons I don't need to explain here, I want a php script, like create_db_user.php that will create a database & a user with a password. Of course I want that user to have privileges too, I'll cross that bridge later.
Everything I find on the web that shows how to create a database assumes the existence of a User and a password, but I can find NO WAY to create a user & a password without a database. So it's like the chicken & the egg.
See attached. I ran this, it did nothing and output this: "Notice: Array to string conversion in C:\xampp\htdocs\seba\creat
php on line 8
I have NO CLUE what that means.
I would like CLEAR & CONCISE steps on how to do this from within a php program.