import bd phpmyadmin 000webhost.com error #1044 - mysql

I have a localhost db, and i want to import it to my phpmyadmin 000webhost.com db. Maybe i don't have privilegies.
SQL query:
CREATE DATABASE IF NOT EXISTS `RF_db` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci
MySQL said: Documentation
#1044 - Access denied for user 'id1302584_grigorie'#'%' to database 'RF_db'

Related

MySQL - Login fails with incorrect match of case for username

I am unable to login to mysql unless I provide exact case match for a user I have in my database.
After looking into the issue I believe my problem is with the collation but I am not sure. I tried to alter collation for the mysql.user table, User column to be latin1_swedish_ci but still could not get it to recognize alternate cases for usernames when I try to login.
My new username is admin ( all lowercase)
The command I am running is
mysql -u admiN -p <------ with username ending in a capital letter
Prior to running the command I ran the SQL statement below.
Here is the command I ran with apparently no effect (Original Collation was utf8_bin)
ALTER TABLE `user` CHANGE `User` `User` CHAR(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
Each time I get the following response.
ERROR 1045 (28000): Access denied for user 'admiN'#'localhost' (using
password: YES)
Only when I login with all lowercase for the username do I succeed in entering into mysql.
Am I missing something else here to get it working? How do I change the mysql configuration to accept case insensitive usernames?

How to fix this? I get when importaing a .sql file.[#Error1044]

Error
SQL query:
--
-- БД: `mlrp`
--
CREATE DATABASE IF NOT EXISTS `mlrp` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
MySQL said: Documentation
#1044 - Access denied for user 'vfwx10mx'#'localhost' to database 'mlrp'
you need that root user will grant privileges to this user.
look for what you need in here:
http://dev.mysql.com/doc/refman/5.1/en/grant.html
So use this:
GRANT ALL ON mlrp.* TO 'vfwx10mx'#'localhost';

Creating tables failed

I have installed mySQL Server and created a user called ej_instance and has set password "password". Logged into server using below command
mysql -u ej_instance -p;
-- entered password
ej_instance has access to only ejabberd database. So I executed command like below
use ejabberd;
Then tried to execute commands like below
SET table_type=InnoDB;
CREATE TABLE users (
username varchar(250) PRIMARY KEY,
password text NOT NULL,
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) CHARACTER SET utf8;
But it is throwing errors at me. Below are errors
ERROR 1193 (HY000): Unknown system variable 'table_type'
ERROR 1046 (3D000): No database selected
How can get this done? anything else to be changed?
Specify the engine type when creating the table, like this:
USE ejabberd;
CREATE TABLE users (
username varchar(250) PRIMARY KEY,
password text NOT NULL,
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) CHARACTER SET utf8 ENGINE = INNODB;
If the use error still showing, check:
the database exists
the user ej_instance has privileges to access and create tables on the database
Loggin as root:
#check the database exists
SHOW DATABASES LIKE 'ejabberd';
#check user permissions
SHOW GRANTS FOR 'ej_instance'#'localhost';
SHOW GRANTS FOR 'ej_instance'#'%';
If don't have enough permissions:
#grant all permission on the user for the specified database
GRANT ALL ON ejabberd.* TO 'ej_instance'#'localhost';
GRANT ALL ON ejabberd.* TO 'ej_instance'#'%';
FLUSH PRIVILEGES;

PHP myadmin import database failure

I am trying to import my old database back into phpmyadmin after deleting it and creating a new one...steps taken....deleted database after back up....created new database with different name and received this error when trying to import
1044 - Access denied for user 'augr_2'#'%' to database 'augr_2'
After some research i found that i must change my CREATE DATABASE line in my database .sql file after amendment it looked like this
CREATE DATABASE `augr_2` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `augr_2`;
But i still keep getting this error?
this is the full error i receive
SQL query:
--
-- Database: `augr_2`
--
CREATE DATABASE `augr_2` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
MySQL said:
1044 - Access denied for user 'augr_2'#'%' to database 'augr_2'
It looks like the mysql used by the PMA doesn't have rights on the newly created db , which is normal.
Try this logged it as root
GRANT ALL ON *.* TO 'augr_2'#'%';
FLUSH PRIVILEGES;

Cannot import database using PhpMyAdmin with Cpanel on a VPS?

I have a recently set up VPS with cPanel.
I've made a user and created a database, and now I would like to import a database onto it.
However, when I try I get the error message
#1044 - Access denied for user 'user'#'localhost' to database 'database'
I suspect that this can be fixed with WHM, but I do not feel like trial and error just yet.
How would I go about fixing this?
When you import a database using phpMyAdmin, normally you do so by importing a text file with a .sql extension. Here is a section of code that may be in a .sql database backup. In your example, the database you are trying to import is named database.
-- 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 database;
-- --------------------------------------------------------
--
-- Table structure for table `table`
--
CREATE TABLE IF NOT EXISTS `table` (
`column1` text NOT NULL,
`column2` 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 database;
MySQL said: Documentation
#1044 - Access denied for user 'user'#'localhost' to database 'database'
In this scenario, the cPanel username is user. Because of cPanel's database naming conventions, all database names must begin with the cPanel username followed by _. Using this format you can only creat a database named user_database.
The reason this import failed is because of the following line in the .sql file...
CREATE DATABASE database;
Again, you cannot create a database named database, however you can create a database named user_database.
If you change the line that says: CREATE DATABASE so that it creates: user_database instead of database it will again fail with the following message:
Error
SQL query:
CREATE DATABASE user_database;
MySQL said: Documentation
#1044 - Access denied for user 'user'#'localhost' to database 'user_database'
When using cPanel, databases must be created within the cPanel itself.
Here are the steps to correct thi sissue:
Create the user_database database within cPanel
Comment out the CREATE DATABASE command in my .sql file
To do this, simply change:
CREATE DATABASE database;
to
-- CREATE DATABASE database;
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 user_database database, and then import as normal.
Before dumping your database, grant full access to your new database user created in Cpanel by the same password of that user:
grant all on database_name.* to database_user#localhost identified by 'password';
Then you need to modify your .sql file (can use notepad++), comment out the part where says create and use the new database:
-- Database: dbname
--
-- CREATE DATABASE IF NOT EXISTS dbname DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
-- USE dbname;
then you should be able to import it to your Cpanel.
To make it official...
The file you're attempting to import probably has something that you don't have permissions for. I would check permissions, then the file you're importing.