I have created database multiple and running SQL
script in PHP
code, but don't know how to create individual username and password of each database.
On the phpMyAdmin default page (localhost) click on the "Privileges" link 1. Click on the "Add a new User link" 2. Assign the User a login and password 3. Where it says "Database for User" select "None" 4. Leave all checkboxes in global privileges unchecked
Press the "Go" button You should see the new user in the User overview. Global privileges should say "Usage".
You can create a user and database by the name of matin11
with this code. you can change user name.
CREATE USER 'matin11'@'localhost';
GRANT ALL PRIVILEGES ON *.* TO 'matin11'@'localhost' REQUIRE NONE WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
CREATE DATABASE IF NOT EXISTS `matin11`;
GRANT ALL PRIVILEGES ON `matin11`.* TO 'matin11'@'localhost';