LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-02-2011, 07:44 AM   #1
uppalagayatri
LQ Newbie
 
Registered: Mar 2011
Posts: 26

Rep: Reputation: 1
MySQL Error Nr. 1045 Access denied for user 'root'@'192.168.0.28' (using password: YE


Hai everybody,

I have install on mysql5.1.47 on fedora12

when i excute below command i can able to login

#mysql -u root -p

if i use

#mysql -h 192.168.0.28 -u root -p

ERROR 1045 (28000): Access denied for user 'root'@'192.168.0.28' (using password: YES)


anybody can help how solve this.


Thanks in advanced....................
 
Old 05-02-2011, 08:10 AM   #2
ChrisWashburn
LQ Newbie
 
Registered: Mar 2011
Location: Glen Mills, PA
Distribution: Redhat. Fedora, Solaris
Posts: 3

Rep: Reputation: 1
When you don't specify the host, mysql will try to access the daemon through a socket file. When you do specify the host ("-h 192.168.0.28"), the daemon will be accessed through the network interface. Assuming that 192.168.0.28 is the local server, you will need to specificaly grant access through the network interface. This is done with "GRANT ... ON ... TO root@192.168.0.28;"
 
1 members found this post helpful.
Old 05-02-2011, 09:03 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
Also, this might help:

http://dev.mysql.com/doc/refman/5.1/...ss-denied.html
 
Old 05-04-2011, 07:46 AM   #4
uppalagayatri
LQ Newbie
 
Registered: Mar 2011
Posts: 26

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by ChrisWashburn View Post
When you don't specify the host, mysql will try to access the daemon through a socket file. When you do specify the host ("-h 192.168.0.28"), the daemon will be accessed through the network interface. Assuming that 192.168.0.28 is the local server, you will need to specificaly grant access through the network interface. This is done with "GRANT ... ON ... TO root@192.168.0.28;"
Hi chris

can u tell me how to apply privileges

mysql>grant all privileges on *.* root@192.168.0.28;

but at that time i am getting below error

##########################
MySQL Error Nr. 2003
Can't connect to MySQL server on '192.168.0.28' (111)
##########################


if i use
#mysql -h 127.0.0.1 -u <root> -p <password>

at this time it is working


please guide me


Thanks in advanced.....................
 
Old 05-04-2011, 06:47 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Check the firewall

iptables -nvL

http://linux.die.net/man/8/iptables
 
Old 05-04-2011, 11:56 PM   #6
uppalagayatri
LQ Newbie
 
Registered: Mar 2011
Posts: 26

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by chrism01 View Post
Check the firewall

iptables -nvL

http://linux.die.net/man/8/iptables
Thanks for giving reply

but i have stopped firewall service in my local & remote system
 
Old 05-05-2011, 12:57 PM   #7
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Not a connection issue, I think; command is incorrect.
Code:
grant all privileges on *.* to root@192.168.0.28 identified by 'password'
A while ago that I used it, so there might be a mistake in the syntax.

Notes:
1) I don't advise to allow mysql root access via the network for security reasons; I only allow mysql root access from the physical machine (or via SSH from remote machines)
2) With the given command, your root user that connects via the network will not be able to grant permissions (which is -again- very advisable in my opinion).
 
Old 05-06-2011, 12:48 AM   #8
uppalagayatri
LQ Newbie
 
Registered: Mar 2011
Posts: 26

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by Wim Sturkenboom View Post
Not a connection issue, I think; command is incorrect.
Code:
grant all privileges on *.* to root@192.168.0.28 identified by 'password'
A while ago that I used it, so there might be a mistake in the syntax.

Notes:
1) I don't advise to allow mysql root access via the network for security reasons; I only allow mysql root access from the physical machine (or via SSH from remote machines)
2) With the given command, your root user that connects via the network will not be able to grant permissions (which is -again- very advisable in my opinion).


Hi Thanks for reply

ISolved the problem. when i change in /etc/my.cnf file bind-address=192.168.0.28 and i have applied privileges at that time
#mysql -h 192.168.0.28 -u root -p <password>
above the command is working.

can any body tell how add one more ip because 192.168.0.28 is my local ip if i change ip in /etc/my.cnf the mysqld daemon is not starting.


please guide me
 
Old 05-06-2011, 08:30 AM   #9
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
To my knowledge, you can't. The server can only listen on one address / port combination. So you have to start a second server (mysqld) with a different configuration.

But I'm actually missing what your trying to achieve. If you want to connect from multiple machines to this server, you have achieved what you wanted. The rest should be solvable with the grant command.

If you want something else, let us know.
 
Old 05-11-2011, 01:45 PM   #10
ChrisWashburn
LQ Newbie
 
Registered: Mar 2011
Location: Glen Mills, PA
Distribution: Redhat. Fedora, Solaris
Posts: 3

Rep: Reputation: 1
If you leave out the "bind-address", the daemon will listen on all interfaces by default. If you want to specifically tell it to listen on all interfaces, you can use "bind-address=0.0.0.0". You stated that when you change the IP in my.cnf, the daemon will not start. What are you changing it to? It must be an IP local to the server.
 
  


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
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) samnjugu Linux - Software 12 01-22-2013 06:22 AM
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) bobby953 Linux - Software 21 03-24-2011 08:35 PM
[SOLVED] mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: 124vikas.dange@gmail.com Linux - Server 4 11-19-2010 01:36 AM
Mysql error 1045: Access denied for user 'root'@'localhost' (using password: YES) visitashu Linux - Server 15 11-10-2010 11:05 PM
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) mohtasham1983 General 2 04-02-2007 06:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:39 PM.

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