MySQL Error 1044 Access Denied Brad MarkleUpdated on December 31, 2025 2 Minute Read This page will assist you with troubleshooting a MySQL – 1044 “Access Denied” Error Message. Troubleshooting the MySQL 1044 “Access Denied” Error When you import a database using phpMyAdmin, generally you are importing a text file with a .sql extension. Here is a section of code that may be in a .sql database backup. In this example, the database we are trying to import is named Employees. -- phpMyAdmin SQL Dump -- SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; CREATE DATABASE employees; -- Table structure for table `employee_list` -- CREATE TABLE IF NOT EXISTS `employee_list` ( `first_name` text NOT NULL, `last_name` text NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- phpMyAdmin SQL Dump -- SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; CREATE DATABASE employees; -- Table structure for table `employee_list` -- CREATE TABLE IF NOT EXISTS `employee_list` ( `first_name` text NOT NULL, `last_name` text NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; When using phpMyAdmin to attempt to import such a file, you will receive an error message similar to: Error SQL query: CREATE DATABASE employees; MySQL said: Documentation #1044 - Access denied for user 'training'@'localhost' to database 'employees' Error SQL query: CREATE DATABASE employees; MySQL said: Documentation #1044 - Access denied for user 'training'@'localhost' to database 'employees' In this scenario, my cPanel username is Training. Because of cPanel’s database naming conventions, all database names must begin with the cPanel username followed by an “_”. I cannot create a database named Employees, however I can create a database named Training_employees. The reason this import failed is because of the following line in the .sql file: CREATE DATABASE employees Again, I cannot create a database named employees, however I can create a database named Training_employees. If I change the line that says: CREATE DATABASE so that it creates: training_employees instead of employees it will again fail with the following message: Error SQL query: CREATE DATABASE training_employees; MySQL said: Documentation #1044 - Access denied for user 'training'@'localhost' to database 'training_employees' Error SQL query: CREATE DATABASE training_employees; MySQL said: Documentation #1044 - Access denied for user 'training'@'localhost' to database 'training_employees' When using cPanel, databases must be created within the cPanel itself. To fix the issue, you will need to: Create the: training_employees database within cPanel Comment out the: CREATE DATABASE command in my .sql file. To do this, simply change: CREATE DATABASE employees; to — CREATE DATABASE employees; You are simply adding dash dash space to the front of the line to comment it out so that it will not be executed. Log into phpMyAdmin, access the training_employees database, and then import as normal. Share this Article Related Articles How to Fix the Insecure SSL Error due to SHA-1 Deprecation MySQL Error 1064: You Have an Error in Your SQL Syntax MySQL Error 1044 Access Denied Troubleshooting: Fixing the “localhost Refused to Connect” Error HTTP Error Codes: What They Mean and How to Fix Them How to Fix the 504 Gateway Timeout Error 500 Internal Server Error How to Fix the “550 No Such User Here” Email Error Email Error – Mailbox Quota Exceeded Resolving DNS_PROBE_FINISHED_NXDOMAIN Errors