LinuxQuestions.org
Review your favorite Linux distribution.
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 11-09-2011, 11:42 PM   #1
Manuel-H
Member
 
Registered: Apr 2003
Location: Singapore
Distribution: Slackware32/64, Ubuntu, Fedora, RHEL
Posts: 138

Rep: Reputation: 15
Cannot Login to phpmyadmin


Hi,

I am stucked and need some assistance here.

I cannot seem to login to my phpmyadmin(v3.4.7) on my browser.(tried using IE,Google,Firefox)
It showed the phpmyadmin login page, but when I enter the username(root) and the password,
the error message "#1043 Cannot log in to the MySQL server" came out.

My MySQL(v5.0.84) server is up and I can login via the CLI. (mysql -u root -p)
I can show the databases and tables via the CLI as well.

I have reset the password for MySQL, flush the privileges.
Restart both MySQL and httpd(v2.2.21, php v5.3.8) too but same error.

Code:
/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['ssl'] = true;
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';

-------------- (tried this too) ------
$cfg['Servers'][$i]['socket'] = '/var/run/mysql/mysql.sock';
I searched and found this similar issues but it did not work for me.
http://www.linuxquestions.org/questi...yadmin-819842/

Is there something that I missed out?
Appreciate any suggestion.
 
Old 11-10-2011, 12:19 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

One question comes to mind. Are you connecting from your browser to localhost, meaning on the same machine that has MySQL installed and running? Or are you trying to connect from another computer to the MySQL server? If you're connecting from another computer did you setup MySQL to listen on the LAN IP and did you configure your firewall (iptables?) to allow connection?

Kind regards,

Eric
 
Old 11-10-2011, 12:24 AM   #3
Manuel-H
Member
 
Registered: Apr 2003
Location: Singapore
Distribution: Slackware32/64, Ubuntu, Fedora, RHEL
Posts: 138

Original Poster
Rep: Reputation: 15
Hi EricTRA,

It's all on the same machine(apache,mysql,phpmyadmin), connecting via localhost.
 
Old 11-10-2011, 12:31 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

Can you post the output of this command:
Code:
netstat -tunalp | grep :3306
(that is if you didn't change the default port for MySQL).

Kind regards,

Eric
 
Old 11-10-2011, 12:50 AM   #5
Manuel-H
Member
 
Registered: Apr 2003
Location: Singapore
Distribution: Slackware32/64, Ubuntu, Fedora, RHEL
Posts: 138

Original Poster
Rep: Reputation: 15
The command "netstat -tunalp | grep :3306" did not have an output.

My "ps -ax" output

Code:
 9338 ?        S      0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid --skip-networking
 9363 ?        Sl     0:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysql/mysql.pid --skip-external-locking --skip-networking
BTW: I am running Slackware v13.0, kernel 2.6.29.6-smp.
 
Old 11-10-2011, 02:25 AM   #6
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

The netstat command should have returned a line like this:
Code:
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      3139/mysqld
indicating that, in my case, MySQL is only listening on my loopback IP. Check your MySQL configuration file. Also, in the output you posted I saw this:
Code:
--skip-networking
which means (from MySQL Reference:
Quote:
Do not listen for TCP/IP connections at all. All interaction with mysqld must be made using named pipes or shared memory (on Windows) or Unix socket files (on Unix). This option is highly recommended for systems where only local clients are permitted.
I'm sure that once you get that fixed you'll be able to connect.

Kind regards,

Eric
 
Old 11-10-2011, 02:57 AM   #7
Manuel-H
Member
 
Registered: Apr 2003
Location: Singapore
Distribution: Slackware32/64, Ubuntu, Fedora, RHEL
Posts: 138

Original Poster
Rep: Reputation: 15
My MySQL only accept connection from localhost, so opening port 3306 should not be an issue.
I do not need connection to MySQL from remote host.
Which is why the phpmyadmin connect to the MySQL via localhost(apache).

Actually it was strange, I was comparing with my another web server and it works perfectly fine with "--skip-networking" option and allowing only localhost connection to MySQL.
 
Old 11-10-2011, 09:27 PM   #8
Manuel-H
Member
 
Registered: Apr 2003
Location: Singapore
Distribution: Slackware32/64, Ubuntu, Fedora, RHEL
Posts: 138

Original Poster
Rep: Reputation: 15
From the Documentation.Txt

I guess, I did not have the phpMyAdmin configuration storage table.
I created it and everything went well now. Thanks all for trying to help.

Code:
phpMyAdmin configuration storage

For a whole set of new features (bookmarks, comments, SQL-history, tracking
mechanism, PDF-generation, column contents transformation, etc.) you need to
create a set of special tables. Those tables can be located in your own
database, or in a central database for a multi-user installation (this database
would then be accessed by the controluser, so no other user should have rights
to it).

Please look at your ./scripts/ directory, where you should find a file called
create_tables.sql. (If you are using a Windows server, pay special attention to
FAQ 1.23).
 
Old 11-11-2011, 01:08 AM   #9
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

You're welcome! Glad you got it solved.

Kind regards,

Eric
 
  


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] Can't login to phpMyAdmin rodriguez Linux - Newbie 12 12-22-2014 08:48 AM
phpmyadmin and login via ssl skoinga Linux - Server 5 12-27-2010 04:53 PM
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

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

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