Error Import mysql phpMyAdmin Error #1044 - Access denied for user
Muncul Pesan error #1044 - Access denied for user '......'@'localhost' to database '......' ketika menginport file mysql ke database mysql di web melalui phpmyadmin. Hal ini disebabkan karena perintah untuk membuat table database tidak di bisa dilakukan.
Solusinya :Buka file backup sql yang akan di upload / import dengan menggunakan notepad dan hapus code berikut
Sumber asli
http://www.inmotionhosting.com/support/website/database-troubleshooting/mysql-1044-access-denied-error-message
MySQL - 1044 Access Denied Error Message
Solusinya :Buka file backup sql yang akan di upload / import dengan menggunakan notepad dan hapus code berikut
CREATE DATABASE /*!32312 IF NOT EXISTS*/`.....` /*!40100 DEFAULT CHARACTER SET utf8 */;Simpan kembali file tersebut dan silahkan di import lagi.
USE `........`;
Sumber asli
http://www.inmotionhosting.com/support/website/database-troubleshooting/mysql-1044-access-denied-error-message
MySQL - 1044 Access Denied Error Message
This page will assist you with troubleshooting a MySQL - 1044 "Access Denied" Error Message.
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
-- version 2.11.9.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 02, 2010 at 08:01 AM
-- Server version: 5.0.81
-- PHP Version: 5.2.6
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'
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 (shown above)
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'
When using cPanel, databases must be created within the cPanel itself.
To fix the issue, you will need to:
|
We are on
menu-navbar