phpmyadmin error

Status
Not open for further replies.

nobodyspecial

New member
Hey guys

when I try an import a DB via the phpmyadmin I receive the following error

Error

SQL query:

CREATE DATABASE IF NOT EXISTS `fatjay_db_` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci

MySQL said: Documentation
#1044 - Access denied for user 'fatjay'@'localhost' to database 'fatjay_db_'
 

nobodyspecial

New member
Ok let me explain this

My database user name is not fatjay and can never be, cpanel adds the prefix of "fatjay_" to the user names, but remember phpmyadmin is logged in with "fatjay" as the account

So where can i go to create a user account called "fatjay" with the required rights?
 

un4saken

Administrator
The problem here is your import file contains an SQL query that attempts to create a database for the wrong username. Modify your .sql file and change the mysql username.
 

nobodyspecial

New member
I am not using a user name in my import file, phpmyadmin uses the logged in user account to create database, So the issue here is that my phpmyadmin user has no access to create a database from with in phpmyadmin,


Below is header of sql dump


-- phpMyAdmin SQL Dump
-- version 4.2.12deb2+deb8u2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 08, 2017 at 01:43 PM
-- Server version: 10.1.22-MariaDB-1~jessie
-- PHP Version: 5.6.30-0+deb8u1

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `fatjay__db_`
--

-- --------------------------------------------------------

--
-- Table structure for table `llx_a_account`
--
 

nobodyspecial

New member
when i use query from phpmyadmin I get this

Error

SQL query:

CREATE DATABASE test

MySQL said: Documentation
#1044 - Access denied for user 'fatjay'@'localhost' to database 'test'
 

un4saken

Administrator
There's no problem with the phpmyadmin.

You need to create your mysql username in your cPanel, add it to your database, give full privileges. Then you can be able to import it.
 

un4saken

Administrator
Fat_Jay said:
when i use query from phpmyadmin I get this

Error

SQL query:

CREATE DATABASE test

MySQL said: Documentation
#1044 - Access denied for user 'fatjay'@'localhost' to database 'test'

You can't create a database from phpmyadmin. You need to create it in your cPanel "MySQL Databases" section.
 

nobodyspecial

New member
OK, so that also means I will not be able to use phpmyadmin to restore the two databases, as the phpmyadmin user does not have the rights to do anything then.

No stress I have plan b in tow already

13500 files to go then I will see if it works

thank you
 

un4saken

Administrator
CREATE DATABASE IF NOT EXISTS `fatjay_db_`

That's why it won't import because you can't create a new database in phpmyadmin. You need to create a new database in your cPanel and import should work.
 
Status
Not open for further replies.