Using phpMyAdmin to Create a MySQL Database, User, Password

Make sure Apache and MySQL are running, and access phpmyadmin via URL:

Login with:

Username: root
Password: (leave it blank, it's not set by default)

Click ‘Go’.

* User “root” under WampDeveloper Pro is restricted to local network access in multiple ways, so setting a password is not absolutely necessary.

Create a database:

  1. Click on the ‘Databases’ tab.
  2. Specify a Database name.
  3. Leave everything else as-is (don’t select a collation).
  4. Click ‘Create’.

Create a user:

  1. Click on the newly created database.
  2. Click on its ‘Privileges’ tab.
  3. In ‘New’ group, click ‘Add user’.
User name ('Use text field'): username-here
Host (select 'Use text field'):
Password ('Use text field'): password-here
Re-type: password-here

Leave everything else as-is:

'Database for user' group: Grant all privileges on database "database-name".
'Global privileges' group: None

Do not select any “Global” privileges/permissions, as this user only needs all privileges/access on the specific database, and not on all the databases under MySQL.

Click ‘Go’.

Whenever you need to specify this info when you install or configure a web-app or script, make sure to enter the db and user info exactly as above, with “Host” as and not as “localhost”.

8 thoughts on “Using phpMyAdmin to Create a MySQL Database, User, Password”

  1. I want to find the Mysql server user name and password. can you please let me know how should i find the user name and password.

    Best Regards

    1. MySQL does not have a username/password… It only has accounts within it, each having permissions to access specific databases.

      If you have forgotten your root account (root usually has all permissions including creating more users) password, you can reset it using this howto…
      Resetting MySQL Root Password

    2. Hi, if you set up the database you might have set an administrative password. If you do not remember doing this type root as username and leave password blank. If all fails on your linux machine type “mysql -p” when it prompts you for a password just hit enter. From there you can change the password.

  2. how to enter username, hostname & password in phpmyadmin, latest version. It asks %_password_

Leave a Reply to Mehdi Cancel reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>