LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-03-2013, 03:23 PM   #1
giobaxx
LQ Newbie
 
Registered: Jul 2013
Posts: 13

Rep: Reputation: Disabled
cannot login a user on phpmyadmin


Hi,....firs sorry for my english..

I'm tryng to install and configure LAMP solution on my UBUNTU. i have installed all the software needed, and i want to create some user in phpmyadmin to admnistrate his own database.

i insert a username( for example alex) a passoword(es: 12345) and at the voice "host" i select from the combobox "ANY HOST". I though that the user alex can log-in on phpmyadmin from every host.

But when i tried to login with username alex i receive the error "#1045 Cannot log in to the MySQL server"...that error from any host i try to connect(local or not).

If I choose "local" instead of "any host" i can login.....from any host(local or remote).....that make me a bit confused...

someome...can help me to undestand how it works?......what it means to select "any host" instead local?

in a professional enviroment what a have to choose? local....any host or other?
 
Old 07-03-2013, 03:28 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
I think you need to have an understanding of the mysql authentication table and how it works as this isnt a PHPMyAdmin thing its a mysqld login thing.

http://dev.mysql.com/doc/refman/5.1/...ing-users.html < Discusses the basics of adding users, about 3 or 4 paragrahs down it discusses the host portion of the user permissions
http://dev.mysql.com/doc/refman/5.1/...on-access.html < Discusses in detail how the user access works with example dumps from the mysql table.
 
Old 07-03-2013, 03:34 PM   #3
giobaxx
LQ Newbie
 
Registered: Jul 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
tanks.....try to read the the documentation.......
 
Old 07-03-2013, 03:38 PM   #4
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Yes try and think about where you are actually initiating the connection from in these cases. PHPMyAdmin initiates the connection from whatever server it is running on. So if you have mysql installed on server A and PHPMyAdmin on server A then they are both on the same host and localhost or server A would be the hostname connecting from. If you had PHPMyAdmin installed on Server B you would have to specify that host in the mysql permissions. I.e

Code:
GRANT ALL PRIVILEGES ON *.* TO 'username'@'server B'
 
Old 07-03-2013, 05:21 PM   #5
giobaxx
LQ Newbie
 
Registered: Jul 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
I had and sure i have even some "casino" in my mynd....

I thought with localhost i can access (to phpmyadmin) with that specif user only if i sign-in in the host where is installed phpmyadin, and with 'any' i can get access from any other host all over internet...


from what i undertand....is right to say that if want that the user 'alex' could connect from any host i have to create two account for 'alex', one with host as 'localost' and one with 'any' setting the wildcard(%)?



.....
 
Old 07-04-2013, 01:55 AM   #6
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Quote:
Originally Posted by giobaxx View Post
is right to say that if want that the user 'alex' could connect from any host i have to create two account for 'alex', one with host as 'localost' and one with 'any' setting the wildcard(%)?
No you will only have one match for each user. So it will go through the table and find the first match of either the username "alex" or the hostname. If you wanted to be able to connect to MySQL from anywhere, including localhost, for the alex user add them with the '%' for the hostname.
 
Old 07-04-2013, 03:16 AM   #7
giobaxx
LQ Newbie
 
Registered: Jul 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
.....try to explain what i did, i spoke about have access to phpmyadmin;

i have create this user on phpmyadmin

username:alex
host:any
password:12345

if i try to login from the webinterface of localhost/phpmyadmin i receive error 1045

i made the same configuration on a remote computer on internet(virtual server on linode) i connect for example to 75.21.84.85/phpmyadmin i received the same error ----> no access in local or remote

i have tried with other user

username:joe
host:local
password:12345

with that user i can have access locally with localhost/phpmyadmin and remotely 75.21.84.85/phpmyadmin --->so with local i have access locally and all over

so with local i tell you to phpmyadmin that mysql is on the same computer of phpmyadmin?..or what?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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] Can't login to phpMyAdmin rodriguez Linux - Newbie 12 12-22-2014 08:48 AM
[SOLVED] Cannot Login to phpmyadmin Manuel-H Linux - Software 8 11-11-2011 01:08 AM
can't login to phpmyadmin candyman123 Linux - Software 2 05-27-2006 08:18 PM
phpmyadmin: can not login quarry_06 Linux - Software 1 04-27-2005 10:37 AM
phpmyadmin can't login vladimir@ares Linux - Software 2 12-31-2004 03:00 AM


All times are GMT -5. The time now is 02:41 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration