LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-30-2011, 09:11 AM   #1
ramecare
Member
 
Registered: Feb 2011
Posts: 179

Rep: Reputation: 0
login problem in mysql


Dear all,
when i enter mysql iam facing the below error.
I have done the below configuration.

Yum install mysql
Yum install mysql-server
Yum install mysql-devel
chgrp -R mysql /var/lib/mysql
chmod -R 770 /var/lib/mysql
Configuration

/usr/bin/mysqladmin -u root password 'ecare2@'
service mysqld restart
can any one help me on this

[root@ram ~]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Thanks,
 
Old 07-30-2011, 09:28 AM   #2
zoran119
Member
 
Registered: Dec 2007
Posts: 217

Rep: Reputation: 18
maybe this:

Code:
/usr/bin/mysqladmin -u root@localhost password 'ecare2@'
 
Old 07-30-2011, 09:34 AM   #3
ramecare
Member
 
Registered: Feb 2011
Posts: 179

Original Poster
Rep: Reputation: 0
I gave the above command iam facing the below error

[root@loft5077 ~]# /usr/bin/mysqladmin -u root@localhost password 'ecare2@'
/usr/bin/mysqladmin: Can't turn off logging; error: 'Access denied; you need the SUPER privilege for this operation'

There is any other way to reset by root login

Thanks,
 
Old 07-31-2011, 08:36 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by ramecare View Post
I gave the above command iam facing the below error

[root@loft5077 ~]# /usr/bin/mysqladmin -u root@localhost password 'ecare2@'
/usr/bin/mysqladmin: Can't turn off logging; error: 'Access denied; you need the SUPER privilege for this operation'

There is any other way to reset by root login
Did you read your first post, and try to look up that error??
Quote:
Originally Posted by ramecare
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
That error is very clear...root user access for mysql has been denied from local host, or you don't need a password for the root user (more likely). Again, a brief search would have turned up LOTS on this, if you bothered to look. And putting an "@" in your password is as much of a bad idea as putting dashes in your database name.

Have you tried just leaving off the password?? Just su into the root user, and type in "mysql", and see what happens. Read the info pages in the MySQL docs on the grant command.
 
Old 08-01-2011, 04:18 AM   #5
ramecare
Member
 
Registered: Feb 2011
Posts: 179

Original Poster
Rep: Reputation: 0
iam able to login without password,
mysql -u root -p
but when i login without i was not able to view mysq database and how can i give password for root and how can i give permission for mysql database,can anyone help me.


Thanks,
 
Old 08-01-2011, 07:12 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by ramecare View Post
iam able to login without password,
mysql -u root -p
but when i login without i was not able to view mysq database and how can i give password for root and how can i give permission for mysql database,can anyone help me.
Again, leave off the password. That means, leave off the -p option. Also, as said before, if you log in as root and just type in "mysql", that may work and was suggested too. Have you tried that????

And again, did you TRY to look this up?? First hit in Google:
http://dev.mysql.com/doc/refman/5.0/...rmissions-unix
 
Old 08-01-2011, 10:36 AM   #7
chandramani_yadav
Member
 
Registered: Jan 2007
Location: Vienna
Distribution: Redhat
Posts: 47

Rep: Reputation: 19
Run following command as root
# mysql_secure_installation

and follow the prompts .... for current password prompt just press Enter.( Please read before pressing entry).
 
Old 08-01-2011, 09:14 PM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by chandramani_yadav View Post
Run following command as root
# mysql_secure_installation

and follow the prompts .... for current password prompt just press Enter.( Please read before pressing entry).
...and if the OP has the error they posted (specifically, root doesn't have access to the databases on localhost), resetting/removing the password won't make a difference. As it says in the link I posted, along with resetting the password, it has the command to grant root access, if it's been removed/changed:
Code:
grant all privileges on *.* to root@localhost;
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Mysql root login problem digsecurity Linux - Newbie 3 06-25-2011 11:29 PM
MySQL - can't do much after login pellicle Linux - Server 23 07-27-2009 08:56 PM
MySQL root login problem AnRkey Linux - Software 2 05-10-2006 05:31 AM
Big problem changed root password for mysql can't login pls comment johnnydangerous Linux - Software 5 07-08-2005 01:22 AM
Pure-ftpd, login with MySQL as control - problem KR-data Linux - Software 0 01-29-2005 06:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration