Solved

Amazon EC2: Access denied for user abc / while other users can connect

Posted on 2010-08-31
2
786 Views
Last Modified: 2012-05-10
I've installed a php application on our server. I have created the user "abc", with a password, and I can login via commandline to mysql as this user. So the user seems to work correctly. We use Amazon EC2, and have a separate database server. When I run the installation wizard, I get the following error:

Access denied for user 'abc'@'ip-xxx.xxx.xxx.xxx.compute.internal' (using password: YES)

In the wizard, I can change the user to 'root', and then the connection works. I don't know what I'm doing wrong here. How can I get this working for this user?
0
Comment
Question by:R7AF
  • 2
2 Comments
 
LVL 2

Accepted Solution

by:
chataros earned 500 total points
ID: 33595888
I think you may need to change the pass and try again with the new password:
MySQL Change User Password                               

 to change a password for user called tom using command line option.
   
First,  login to MySQL server, type following command at prompt to login as root
 1) mysql -u root -p
2) Use mysql database (type command at mysql> prompt, do not include string "mysql>"):
 mysql> use mysql;
3) Change password for user tom:
 mysql> update user set password=PASSWORD("NEW-PASSWORD-HERE") where User='tom';

then try again  to login
0
 
LVL 2

Assisted Solution

by:chataros
chataros earned 500 total points
ID: 33595909
Or if this still doesn't work, you may need to grant permissions to the tables:

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
    ->     ON Database.Table
    ->     TO 'user'@'localhost'
    ->     IDENTIFIED BY 'pass';


0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now