Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #171089 > unrolled thread

MySQL access denied for user

Started byBill Wohler <wohler@newt.com>
First post2016-08-15 07:20 +0200
Last post2016-08-15 16:00 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.debian.user


Contents

  MySQL access denied for user Bill Wohler <wohler@newt.com> - 2016-08-15 07:20 +0200
    Re: MySQL access denied for user Liam O'Toole <liam.p.otoole@gmail.com> - 2016-08-15 12:10 +0200
      Re: MySQL access denied for user limpia <limpia@openmailbox.org> - 2016-08-15 16:00 +0200

#171089 — MySQL access denied for user

FromBill Wohler <wohler@newt.com>
Date2016-08-15 07:20 +0200
SubjectMySQL access denied for user
Message-ID<s6itz-1kI-3@gated-at.bofh.it>
I'm getting the following:

    $ mysql -h localhost -u user
    Enter password: 
    ERROR 1045 (28000): Access denied for user 'user'@'localhost' (using password: YES)

This user was created with a fresh installation of mysql as (mysql) root
with the following:

mysql> create user 'user'@'localhost' identified by 'password';
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON database.* TO 'user'@'localhost' IDENTIFIED BY 'password' with grant option;
Query OK, 0 rows affected (0.00 sec)

I'm trying to create a database user for Drupal, but am not having any
luck. Help for a MySQL newb is very much appreciated.

This is on jessie with MySQL 5.5.

-- 
Bill Wohler <wohler@newt.com> aka <Bill.Wohler@nasa.gov>
http://www.newt.com/wohler/
GnuPG ID:610BD9AD

[toc] | [next] | [standalone]


#171095

FromLiam O'Toole <liam.p.otoole@gmail.com>
Date2016-08-15 12:10 +0200
Message-ID<s6n0d-4eK-3@gated-at.bofh.it>
In reply to#171089
On 2016-08-15, Bill Wohler <wohler@newt.com> wrote:
> I'm getting the following:
>
>     $ mysql -h localhost -u user
>     Enter password: 
>     ERROR 1045 (28000): Access denied for user 'user'@'localhost' (using password: YES)
>
> This user was created with a fresh installation of mysql as (mysql) root
> with the following:
>
> mysql> create user 'user'@'localhost' identified by 'password';
> Query OK, 0 rows affected (0.00 sec)
> mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON database.* TO 'user'@'localhost' IDENTIFIED BY 'password' with grant option;
> Query OK, 0 rows affected (0.00 sec)
>
> I'm trying to create a database user for Drupal, but am not having any
> luck. Help for a MySQL newb is very much appreciated.
>
> This is on jessie with MySQL 5.5.
>

Try this:

	$ mysql -h localhost -u user -p db_name

The '-p' indicates that you wish to be prompted for the password and
db_name is the name of the database you wish to connect to.

The choice of 'user' as your username might be problematic in some
circumstances since that is a reserved word in SQL.

-- 

Liam

[toc] | [prev] | [next] | [standalone]


#171105

Fromlimpia <limpia@openmailbox.org>
Date2016-08-15 16:00 +0200
Message-ID<s6qAN-6iP-17@gated-at.bofh.it>
In reply to#171095
On 2016-08-15 04:54, Liam O'Toole wrote:
> On 2016-08-15, Bill Wohler <wohler@newt.com> wrote:
>> I'm getting the following:
>> 
>>     $ mysql -h localhost -u user
>>     Enter password:
>>     ERROR 1045 (28000): Access denied for user 'user'@'localhost' 
>> (using password: YES)
>> 
>> This user was created with a fresh installation of mysql as (mysql) 
>> root
>> with the following:
>> 
>> mysql> create user 'user'@'localhost' identified by 'password';
>> Query OK, 0 rows affected (0.00 sec)
>> mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, 
>> ALTER, CREATE TEMPORARY TABLES ON database.* TO 'user'@'localhost' 
>> IDENTIFIED BY 'password' with grant option;
>> Query OK, 0 rows affected (0.00 sec)
>> 
>> I'm trying to create a database user for Drupal, but am not having any
>> luck. Help for a MySQL newb is very much appreciated.
>> 
>> This is on jessie with MySQL 5.5.
>> 
> 
> Try this:
> 
> 	$ mysql -h localhost -u user -p db_name
> 
> The '-p' indicates that you wish to be prompted for the password and
> db_name is the name of the database you wish to connect to.
> 
> The choice of 'user' as your username might be problematic in some
> circumstances since that is a reserved word in SQL.

  Hello,
  I don't know much about mysql myself, just started recently as
well, but I did find this help full ,

http://dev.mysql.com/doc/refman/5.7/en/create-user.html

Good luck

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web