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-2014, 08:15 AM   #1
derekchung_8080
LQ Newbie
 
Registered: May 2014
Location: ff
Posts: 5

Rep: Reputation: Disabled
can not access phpmyadmin


In my linux server , there is phpmyadmin installed , I can use root user to login phpmyadmin via web browser , after I changed the mysql root password ( use command line ) , I no longer use the root user to login phpmyadmin .
I just tried to reset the mysql root password in command line , but still can not use the new password to lgoin phpmyadmin , the error is #2002 Cannot log in to the MySQL server , would advise how to fix it ? is it possible to change the phpmyadmin to null password ? thanks
 
Old 05-03-2014, 11:29 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
I advise against using phpmyadmin. It is a common attack vector for hacking servers. You would better be served by learning MySQL and creating yourself scripts for common tasks (e.g. backing up the database, etc). I realize most people who use phpmyadmin don't like to hear that but I implore you to avoid using it.
 
Old 05-04-2014, 08:53 AM   #3
derekchung_8080
LQ Newbie
 
Registered: May 2014
Location: ff
Posts: 5

Original Poster
Rep: Reputation: Disabled
thanks reply ,

the server is owned by me , I just help our client to do that , they insist to use it.

For my problem , would advise how to do it ? thanks
 
Old 05-06-2014, 05:31 AM   #4
eklavya
Member
 
Registered: Mar 2013
Posts: 636

Rep: Reputation: 142Reputation: 142
Update the root password using following query after reaching on mysql prompt
Quote:
UPDATE mysql.user SET Password=PASSWORD('new-password-here') WHERE User='root' AND Host='host-name-here';
Do you know the correct hostname of user root?

Are you able to log into mysql root account through command line? Suppose your host is 127.0.0.1, your username is root.
Quote:
# mysql -h 127.0.0.1 -u root -p
It will ask for password. Put your password here. It should open mysql prompt.

Are you not able to open mysql prompt as a user root?

Did you restart mysql after updating root password?
 
Old 05-07-2014, 01:52 AM   #5
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Rep: Reputation: Disabled
Quote:
Originally Posted by eklavya View Post
Update the root password using following query after reaching on mysql prompt

Do you know the correct hostname of user root?

Are you able to log into mysql root account through command line? Suppose your host is 127.0.0.1, your username is root.

It will ask for password. Put your password here. It should open mysql prompt.

Are you not able to open mysql prompt as a user root?

Did you restart mysql after updating root password?
thanks reply ,

I can login mysql db in command prompt , now my problem can not use this password to login phpmyadmin .

I just would like to confirm mysql db root password is the same phpmyadmin root password ? thanks
 
Old 05-07-2014, 04:36 AM   #6
eklavya
Member
 
Registered: Mar 2013
Posts: 636

Rep: Reputation: 142Reputation: 142
Quote:
Originally Posted by byran cheung View Post
thanks reply ,

I can login mysql db in command prompt , now my problem can not use this password to login phpmyadmin .

I just would like to confirm mysql db root password is the same phpmyadmin root password ? thanks
Yes, it should be.
If you can log into mysql prompt, can you paste output of this query?
Code:
SELECT * FROM mysql.user WHERE User='root';
You can not login using blank password in phpmyadmin but you can log into mysql command prompt using blank password.
If you want to log into phpmyadmin without password, you have to give hard coded username password in config.inc.php file of phpmyadmin.

If you have used older versions of xampp where XAMPP security concept was not implemented, you can log into phpmyadmin without login screen as a root user. Just open the link http://localhost/phpmyadmin and you are inside the phpmyadmin.

If you put these values in config.inc.php of phpmyadmin where root password is blank in user table of mysql database, it does not promt for username and password and you can loginto phpmyadmin without login credentials.
Code:
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

By the way, How many accounts of LQ do you have, it is not the same account from where you asked the question.
 
  


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
Cannot Restrict phpMyAdmin Access andperry Linux - Server 4 07-30-2013 07:19 AM
i am not able access phpmyadmin locally and remotelly.....and nagios also nandunay Linux - Server 2 06-25-2012 12:00 AM
phpMyAdmin - Access denied!! jackster Linux - Software 5 02-02-2005 04:04 PM
Access Denied to phpMyAdmin 2.5.2-pl1 TastyWheat Linux - Software 0 09-01-2003 10:38 PM
phpmyadmin/access denied xlord Linux - General 3 06-10-2003 05:50 PM

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

All times are GMT -5. The time now is 02:31 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