Author Topic: After installing phpMyAdmin cannot connect.  (Read 886 times)

Offline ianw

  • Full Member
  • ***
  • Posts: 69
After installing phpMyAdmin cannot connect.
« on: May 30, 2012, 04:43:34 AM »
Hi All

I have installed phpMyAdmin (Via Synaptic) to work on a MySQL Database on PCLOS 2012-2.

When I click on the phpMyAdmin program on the Program Menu Firefox starts but gives the error...

"Unable to connect. Firefox can't establish a connection to the server at localhost"

MySQL is on the local machine and is running and I can work with it via the Command Line. And Firefox works 100% for accessing the Net.

Any idea what the problem is??

Thanks

IanW
Pretoria.
IanW
Pretoria, South Africa
PCLOS 2013-4

Offline Archie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8583
  • Aurum nostrum non est aurum vulgi.
Re: After installing phpMyAdmin cannot connect.
« Reply #1 on: May 30, 2012, 05:22:16 AM »
Check PCC (Configure Your Computer) > System > Manage system services ...

Check if httpd is running. Check if mysqld is running.

These two services should be running. If not start them up.

Then try phpMyAdmin on FF again.
Since 2006 | LiCo 401868 | Bare Metal | What is necessary is never unwise. --Sarek, 2258.42


Offline ianw

  • Full Member
  • ***
  • Posts: 69
Re: After installing phpMyAdmin cannot connect.
« Reply #2 on: May 30, 2012, 07:26:21 AM »
Thanks Archie!!!

That was it!!

As I said - I had checked that MySQL was running OK but did not know about httpd. Once I started that phpMyAdmin started...

BUT - Now it complains about mysqli missing and will not let me into the program.

I don't find mysqli in the PCLOS Repos and all I can find out about it in the Net is that it is a php to SQL driver. Where do I get it and how do I install it?

The program also complains about not allowing Login without a Password but does not accept my standard Login Name and Password so where is this set??

Thanks again!!
IanW
Pretoria, South Africa
PCLOS 2013-4

Offline Archie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8583
  • Aurum nostrum non est aurum vulgi.
Re: After installing phpMyAdmin cannot connect.
« Reply #3 on: May 30, 2012, 07:51:49 AM »
Thanks Archie!!!

That was it!!

As I said - I had checked that MySQL was running OK but did not know about httpd. Once I started that phpMyAdmin started...

BUT - Now it complains about mysqli missing and will not let me into the program.

I don't find mysqli in the PCLOS Repos and all I can find out about it in the Net is that it is a php to SQL driver. Where do I get it and how do I install it?

The program also complains about not allowing Login without a Password but does not accept my standard Login Name and Password so where is this set??

Thanks again!!

We have it on our repository. Do a Synaptic search for php-mysqli.

On a terminal, (if you've never set a root password):

Code: [Select]
$ mysqladmin -u root password NEWPASSWORD
Launch FF+phpMyAdmin, login as root using the password you set on NEWPASSWORD.

Make sure you create your own db user, set a good password and assign privileges.

HTH

Since 2006 | LiCo 401868 | Bare Metal | What is necessary is never unwise. --Sarek, 2258.42


Offline ianw

  • Full Member
  • ***
  • Posts: 69
Re: After installing phpMyAdmin cannot connect.
« Reply #4 on: May 30, 2012, 09:31:07 AM »
Thanks again Archie!!

Thanks for the "heads-up" to what the PCLOS Repo calls "mysqli". I got it and installed it!!

As I did have a Root Password I skipped the next step and tried to Login with 'root' and my password - NO GO!!

So I went back a step and set a new Password as you explained. Tried to Login again - STILL NO GO!!

Did a full system shutdown and restart - NO CHANGE.

The error I get is - "#1045 Cannot log in to the MySQL server".

I've checked... httpd and mysql ARE running.

Where to now and why is getting a new piece of software such a PITA!!!???
IanW
Pretoria, South Africa
PCLOS 2013-4

Offline JohnW_57

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2115
Re: After installing phpMyAdmin cannot connect.
« Reply #5 on: May 30, 2012, 10:07:07 AM »
Thanks again Archie!!

Thanks for the "heads-up" to what the PCLOS Repo calls "mysqli". I got it and installed it!!

As I did have a Root Password I skipped the next step and tried to Login with 'root' and my password - NO GO!!

So I went back a step and set a new Password as you explained. Tried to Login again - STILL NO GO!!

Did a full system shutdown and restart - NO CHANGE.

The error I get is - "#1045 Cannot log in to the MySQL server".

I've checked... httpd and mysql ARE running.

Where to now and why is getting a new piece of software such a PITA!!!???


Maybe this help you further: http://www.linuxquestions.org/questions/linux-newbie-8/cant-login-to-phpmyadmin-819842/
or google with: #1045 Cannot log in to the MySQL server

JohnW
PCLinuxOS 2013 KDE4 (64 bit) on: home build system:  Intel Core 2 Quad (q6700) (2.66ghz), Asus P5K motherboard, 4 gig ddr2 memory, Asus Nvidia Geforce GTS 250 1024 mb gddr3, Crucial M4 128 SSD,  2x Samsung 500 gig HDD (sata), TSSTcorp CDDVDW SH-224BB.

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5331
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: After installing phpMyAdmin cannot connect.
« Reply #6 on: May 30, 2012, 10:17:41 AM »
Please be aware that normally one does not have issues like this when setting up phpmyadmin from synaptic. I have setup many system over the past years with PCLOS and myphpadmin and have not yet once encountered the issue you are having!  This is not the norm.

By any chance did you use either a "@" or a "!" in your password when setting it up?  myPHPAdmin don't like them in a password.

You might try the following

in a console (terminal) window type in the following, where NEWPASSWORD is the password of your choosing.

$ mysqladmin -u root password NEWPASSWORD

and than login to phpmyadmin using 'root' and your newpassword.

If that doesn't work then you could change the config.inc.php file.  In a console window, as the root user, use the command

locate config.inc.php

you should see something such as

[root@pclosusers youcantoo]# locate config.inc.php
/home/members/linuxguy/phpmyadmin/config.inc.php
/home/members/scripts/php/myadmin/config.inc.php3
[root@pclosusers youcantoo]#

then open your favorite editor in superuser mode and edit the following line


$cfg['Servers'][$i]['password']      = '';          // MySQL password (only needed
                                                             // with 'config' auth_type)

you will need to add your password like this


$cfg['Servers'][$i]['password']      = 'MYNEWPASSWORD';          // MySQL password (only needed
                                                                                        // with 'config' auth_type)

Make sure there is a single quote mark on both sides of your new password.
Save the file and try logging into myPHPAdmin and see if that works for you
« Last Edit: May 30, 2012, 10:24:58 AM by YouCanToo »




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline ianw

  • Full Member
  • ***
  • Posts: 69
Re: After installing phpMyAdmin cannot connect.
« Reply #7 on: May 31, 2012, 03:16:09 AM »
Thanks to everyone for helping.... only it's not!!

I've followed all the suggestions offered with still no luck. And now I can't even get into MySQL at the Command Line. I get the error...

"ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)"

I tried re-installing phpMyAdmin but no change.

What I have in my config.inc.php file is...

$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['password'] = 'xxxxxx';
(This line I added)

Thanks as always!!
IanW
Pretoria, South Africa
PCLOS 2013-4

Offline inseine

  • Jr. Member
  • **
  • Posts: 41
Re: After installing phpMyAdmin cannot connect.
« Reply #8 on: May 31, 2012, 03:38:04 AM »
I followed this information to get mysql working.. see if it helps you

http://en.kioskea.net/faq/673-phpmyadmin-access-denied-for-user-root-localhost
Wherever you are.. be there!

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5331
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: After installing phpMyAdmin cannot connect.
« Reply #9 on: May 31, 2012, 10:34:58 AM »
Thanks to everyone for helping.... only it's not!!

I've followed all the suggestions offered with still no luck. And now I can't even get into MySQL at the Command Line. I get the error...

"ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)"

I tried re-installing phpMyAdmin but no change.

What I have in my config.inc.php file is...

$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['password'] = 'xxxxxx';
(This line I added)

Thanks as always!!

Since you are getting this error Access denied for user 'root'@'localhost' (using password: NO) have you tried using just root as the username and leaving the password empty? 




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!