Stuck trying to creating a new mysql database


So i am trying to create a new database, and every time i try the

CREATE DATABASE database name;

I get the error below #1044 - Access denied for user ‘phpmyadmin’@‘localhost’

i tried the [‘AllowNoPassword’] = TRUE; method and i still wasn’t able to create a database within the installed phpmyadmin

i tried using root with the admin password but that didint work

Any ideas?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


When you create a database from the CLI, you should use two commands; one to create the db and one to create the user.

Creating the Database

create database mydb;

Creating the User

grant all on mydb.* to 'myuser'@'localhost' identified by 'mypassword';

The above grants all privileges to myuser on mydb using mypassword. Capitalization doesn’t matter in this case, though the single quotes do, so make you you keep those in place.

As far as phpMyAdmin, normally I recommend going with a solution that’s far easier to manage, and that would be Adminer. Instead of hundreds of files, it’s a single file:

You’ll download the above, upload it to any directory you wish, and then login as normal.