3

As lot of dummies, I cannot connect to MySQL server with user.

This is settings of my USER in DB mysql table user

Host:   %
User: someone
Password: mypassword
Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv, Create_view_priv, Show_view_priv, Create_routine_priv, Alter_routine_priv, Create_user_priv: Y
max_questions, max_updates, max_connection, max_user_connections: 0

Connection

Im connecting via localhost console OR phpMyAdmin installed on this machine.

MySQL Server

Information from phpMyAdmin: Server: Localhost via UNIX socket | Server version: 5.0.70-log | Protocol version: 10

  1. When mysql server is running as mysqld_safe --skip-grant-tables & then I can connect to server as any user.
  2. When mysql server is running normally as /etc/init.d/mysqld start then I cannot an I have error

    1045 : Access denied for user 'someone'@'localhost' (using password: YES)

I was spending hours to find solution in google and mysql documentation but without result. Probably it will be some essential settings. Hope you will give me some suggestion. Thanks a lot.

Vasfed
  • 18,013
  • 10
  • 47
  • 53
radio
  • 103
  • 1
  • 2
  • 7
  • what happens if you specify host=hostname instead of host=localhost? – ethrbunny Nov 16 '12 at 12:16
  • possible duplicate of [MySQL - ERROR 1045 - Access denied](http://stackoverflow.com/questions/489119/mysql-error-1045-access-denied) – Jocelyn Nov 16 '12 at 14:56
  • one problem was with password. I stored it as plain text instead encrypted password('mypassword') – radio Nov 19 '12 at 09:20
  • Second problem was/is that the `%` sign not work. I must set up `localhost` otherwise I still have `#1045 Cannot log in to the MySQL server` – radio Nov 19 '12 at 09:44

1 Answers1

1

You probably need to reset the password for the someone user. It happens often.

Try to start your local server with no password check:

mysqld_safe --skip-grant-tables

And then

set password for 'someone'@'localhost' password('new fancy password')

(notice the '')

See more info in the docs: http://dev.mysql.com/doc/refman/5.0/en/set-password.html

This answer might also help

MySQL - ERROR 1045 - Access denied

Community
  • 1
  • 1
pdjota
  • 3,163
  • 2
  • 23
  • 33
  • thanx this was one of the problem. I stored password as plain text not encrypted with password('mypassword'). – radio Nov 19 '12 at 09:17