Reading Time: < 1 minute
When using PhpMyAdmin, it’s essential to have the correct user permissions to create edits/writes to the database. Otherwise, insufficient permissions can lead to errors like the ones pictured below “#1044 – Access denied for user …[using password: YES]
” and “#1045 – Access denied for user…[using password: YES]
”. In our tutorial, we’ll show you how to correct this issue using the command line terminal. Let’s get started!
- Root access to the server hosting PhpMyAdmin
Connect to your server using SSH, from your computer’s terminal.
When the MariaDB was installed a default user was also created, for our Ubuntu install this details of this user can be found at /etc/dbconfig-common/phpmyadmin.conf
. We’ll be talking our default user, phpmyadmin
, and granting them permissions to create a database within PhpMyAdmin.
grant create on *.* to phpmyadmin@localhost;
Alternatively, if you are trying to delete a database you can use this command replacing username with the user in question.
UPDATE mysql.user SET Grant_priv='Y', Super_priv='Y' WHERE User='username';
GRANT ALL ON *.* TO 'username'@'localhost';
Log into PhpMyAdmin, by going to http://yourhostname.com/phpmyadmin.
Create a Database within PhpMyAdmin by selecting the SQL
tab and running a command to create the database. Paste in the following command, replacing cooldb
with the database name and selecting Go
CREATE DATABASE cooldb;
You’ll know the database was created by the success message and it’ll appear in the left-hand side menu bar.
Liquid Web server customer’s get the convenience of calling our support tech 24/7. Our technicians have a wealth of knowledge and can help with common issues like this. Make the switch and get free migration to your VPS server with round the clock support.