Installation fails if MySQL server is not configured

Bug #456674 reported by giuseppe on 2009-10-20
786
This bug affects 161 people
Affects Status Importance Assigned to Milestone
phpmyadmin (Debian)
Fix Released
Undecided
Unassigned
phpmyadmin (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: phpmyadmin

giuseppe@ulisse:~$ sudo gedit /etc/apache2/sites-available/default
giuseppe@ulisse:~$ sudo /etc/init.d/apache2 restart
 * Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
 ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                                         [ OK ]
giuseppe@ulisse:~$ sudo cp -R /var/www/ /home/giuseppe/siti/
giuseppe@ulisse:~$ sudo chmod -R 777 /home/giuseppe/siti/
giuseppe@ulisse:~$ phpmyadmin
bash: phpmyadmin: comando non trovato
giuseppe@ulisse:~$ sudo phpmyadmin
sudo: phpmyadmin: command not found
giuseppe@ulisse:~$
giuseppe@ulisse:~$ mysqladmin -u root -p create mydababase
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'

ProblemType: Package
Architecture: i386
DistroRelease: Ubuntu 9.04
ErrorMessage: il sottoprocesso post-installation script ha restituito un codice di errore 1
NonfreeKernelModules: nvidia
Package: phpmyadmin 4:3.1.2-1ubuntu0.1
PackageArchitecture: all
SourcePackage: phpmyadmin
Title: package phpmyadmin 4:3.1.2-1ubuntu0.1 failed to install/upgrade: il sottoprocesso post-installation script ha restituito un codice di errore 1
Uname: Linux 2.6.28-15-generic i686

giuseppe (giuseppebasile96012) wrote :
Changed in phpmyadmin (Debian):
status: Unknown → New
Michal Čihař (nijel) on 2009-10-30
summary: - giuseppe@ulisse:~$ sudo /etc/init.d/apache2 restart * Restarting web
- server apache2 apache2:
- Could not reliably determine the server's fully qualified domain name,
- using 127.0.1.1 for ServerName ... waiting apache2: Could not reliably
- determine the server's fully qualified domain name, using 127.0.1.1 for
- ServerName
- [ OK ]
+ Installation fails if mysql server is not configured
summary: - Installation fails if mysql server is not configured
+ Installation fails if MySQL server is not configured
Jan Baarda (j-baarda) wrote :

This problem is coursed by the common ubuntu 9.10 desktop installation:
 "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'"

N.B. This error does not occur in the 9.10 server version. Still waiting for a solution in the ubuntu 9.10 desktop configuration.

Michal Čihař (nijel) wrote :

Fix commited to svn.

Changed in phpmyadmin (Ubuntu):
status: New → Fix Committed
Changed in phpmyadmin (Debian):
importance: Unknown → Undecided
Michal Čihař (nijel) wrote :

Fixed in phpmyadmin 4:3.2.3-2.

Changed in phpmyadmin (Debian):
status: New → Fix Released

How can I get the fix?

2009/11/16 Michal Čihař <email address hidden>

> Fixed in phpmyadmin 4:3.2.3-2.
>
> ** Changed in: phpmyadmin (Debian)
> Status: New => Fix Released
>
> --
> Installation fails if MySQL server is not configured
> https://bugs.launchpad.net/bugs/456674
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in “phpmyadmin” package in Ubuntu: Fix Committed
> Status in “phpmyadmin” package in Debian: Fix Released
>
> Bug description:
> Binary package hint: phpmyadmin
>
> giuseppe@ulisse:~$ sudo gedit /etc/apache2/sites-available/default
> giuseppe@ulisse:~$ sudo /etc/init.d/apache2 restart
> * Restarting web server apache2
> apache2: Could not reliably determine the server's fully qualified
> domain name, using 127.0.1.1 for ServerName
> ... waiting apache2: Could not reliably determine the server's fully
> qualified domain name, using 127.0.1.1 for ServerName
> [
> OK ]
> giuseppe@ulisse:~$ sudo cp -R /var/www/ /home/giuseppe/siti/
> giuseppe@ulisse:~$ sudo chmod -R 777 /home/giuseppe/siti/
> giuseppe@ulisse:~$ phpmyadmin
> bash: phpmyadmin: comando non trovato
> giuseppe@ulisse:~$ sudo phpmyadmin
> sudo: phpmyadmin: command not found
> giuseppe@ulisse:~$
> giuseppe@ulisse:~$ mysqladmin -u root -p create mydababase
> Enter password:
> mysqladmin: connect to server at 'localhost' failed
> error: 'Access denied for user 'root'@'localhost' (using password: YES)'
>
> ProblemType: Package
> Architecture: i386
> DistroRelease: Ubuntu 9.04
> ErrorMessage: il sottoprocesso post-installation script ha restituito un
> codice di errore 1
> NonfreeKernelModules: nvidia
> Package: phpmyadmin 4:3.1.2-1ubuntu0.1
> PackageArchitecture: all
> SourcePackage: phpmyadmin
> Title: package phpmyadmin 4:3.1.2-1ubuntu0.1 failed to install/upgrade: il
> sottoprocesso post-installation script ha restituito un codice di errore 1
> Uname: Linux 2.6.28-15-generic i686
>

Shahar Or (mightyiam) wrote :

Dear Alok,

If the bug is fixed in your version of Ubuntu, you'll get it fixed via an updated package. But it isn't so you'll either have to wait for it, or make extra effort.

Tony (s-t-sicil) on 2009-11-18
Changed in phpmyadmin (Ubuntu):
status: Fix Committed → Fix Released
Download full text (4.2 KiB)

I'm stll workng about this.....when i have something ,ii will tell
you........

----Messaggio originale----
Da: <email address hidden>
Data:
17/11/2009 18.00
A: <email address hidden>
Ogg: Re: [Bug 456674] Re:
Installation fails if MySQL server is not configured

How can I get the
fix?

2009/11/16 Michal Čihař <email address hidden>

> Fixed in phpmyadmin
4:3.2.3-2.
>
> ** Changed in: phpmyadmin (Debian)
> Status: New
=> Fix Released
>
> --
> Installation fails if MySQL server is not
configured
> https://bugs.launchpad.net/bugs/456674
> You received this
bug notification because you are a direct subscriber
> of a duplicate
bug.
>
> Status in “phpmyadmin” package in Ubuntu: Fix Committed
>
Status in “phpmyadmin” package in Debian: Fix Released
>
> Bug
description:
> Binary package hint: phpmyadmin
>
> giuseppe@ulisse:~$
sudo gedit /etc/apache2/sites-available/default
> giuseppe@ulisse:~$
sudo /etc/init.d/apache2 restart
> * Restarting web server apache2

> apache2: Could not reliably determine the server's fully
qualified
> domain name, using 127.0.1.1 for ServerName
> ... waiting
apache2: Could not reliably determine the server's fully
> qualified
domain name, using 127.0.1.1 for ServerName

>
[
> OK ]
> giuseppe@ulisse:~$ sudo cp -R /var/www/ /home/giuseppe/siti/

> giuseppe@ulisse:~$ sudo chmod -R 777 /home/giuseppe/siti/
>
giuseppe@ulisse:~$ phpmyadmin
> bash: phpmyadmin: comando non trovato
>
giuseppe@ulisse:~$ sudo phpmyadmin
> sudo: phpmyadmin: command not
found
> giuseppe@ulisse:~$
> giuseppe@ulisse:~$ mysqladmin -u root -p
create mydababase
> Enter password:
> mysqladmin: connect to server at
'localhost' failed
> error: 'Access denied for user 'root'@'localhost'
(using password: YES)'
>
> ProblemType: Package
> Architecture: i386
>
DistroRelease: Ubuntu 9.04
> ErrorMessage: il sottoprocesso post-
installation script ha restituito un
> codice di errore 1
>
NonfreeKernelModules: nvidia
> Package: phpmyadmin 4:3.1.2-1ubuntu0.1
>
PackageArchitecture: all
> SourcePackage: phpmyadmin
> Title: package
phpmyadmin 4:3.1.2-1ubuntu0.1 failed to install/upgrade: il
>
sottoprocesso post-installation script ha restituito un codice di
errore 1
> Uname: Linux 2.6.28-15-generic i686
>

--
Installation
fails if MySQL server is not configured
https://bugs.launchpad.
net/bugs/456674
You received this bug notification because you are a
direct subscriber
of a duplicate bug.

Status in “phpmyadmin” package
in Ubuntu: Fix Committed
Status in “phpmyadmin” package in Debian: Fix
Released

Bug description:
Binary package hint: phpmyadmin

giuseppe@ulisse:~$ sudo gedit /etc/apache2/sites-available/default

giuseppe@ulisse:~$ sudo /etc/init.d/apache2 restart
 * Restarting web
server apache2 apache2:
Could not reliably determine the server's fully qualified domain name,
using 127.0.1.1 for ServerName
 ... waiting apache2: Could not reliably
determine the server's fully qualified domain name, using 127.0.1.1 for
ServerName

[ OK ]
...

Read more...

Shahar Or (mightyiam) wrote :

Dear Alok,

What I did in order to purge phpmyadmin, is to have the mysql-server package installed while trying to purge phpmyadmin. Is this what you're trying to do - purge it?

Thnaks you all for the replies. Actually I had mysql-server installed and I
was installing php and phpadmin from "Synaptic package manager" during
installation I was asked for the password for root account of mysql and I
gave it correct but still it was not taking it. Ultimately I cancelled it
and got the bug.

Regards
Alok

2009/11/19 Shahar Or <email address hidden>

> Dear Alok,
>
> What I did in order to purge phpmyadmin, is to have the mysql-server
> package installed while trying to purge phpmyadmin. Is this what you're
> trying to do - purge it?
>
> --
> Installation fails if MySQL server is not configured
> https://bugs.launchpad.net/bugs/456674
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in “phpmyadmin” package in Ubuntu: Fix Released
> Status in “phpmyadmin” package in Debian: Fix Released
>
> Bug description:
> Binary package hint: phpmyadmin
>
> giuseppe@ulisse:~$ sudo gedit /etc/apache2/sites-available/default
> giuseppe@ulisse:~$ sudo /etc/init.d/apache2 restart
> * Restarting web server apache2
> apache2: Could not reliably determine the server's fully qualified
> domain name, using 127.0.1.1 for ServerName
> ... waiting apache2: Could not reliably determine the server's fully
> qualified domain name, using 127.0.1.1 for ServerName
> [
> OK ]
> giuseppe@ulisse:~$ sudo cp -R /var/www/ /home/giuseppe/siti/
> giuseppe@ulisse:~$ sudo chmod -R 777 /home/giuseppe/siti/
> giuseppe@ulisse:~$ phpmyadmin
> bash: phpmyadmin: comando non trovato
> giuseppe@ulisse:~$ sudo phpmyadmin
> sudo: phpmyadmin: command not found
> giuseppe@ulisse:~$
> giuseppe@ulisse:~$ mysqladmin -u root -p create mydababase
> Enter password:
> mysqladmin: connect to server at 'localhost' failed
> error: 'Access denied for user 'root'@'localhost' (using password: YES)'
>
> ProblemType: Package
> Architecture: i386
> DistroRelease: Ubuntu 9.04
> ErrorMessage: il sottoprocesso post-installation script ha restituito un
> codice di errore 1
> NonfreeKernelModules: nvidia
> Package: phpmyadmin 4:3.1.2-1ubuntu0.1
> PackageArchitecture: all
> SourcePackage: phpmyadmin
> Title: package phpmyadmin 4:3.1.2-1ubuntu0.1 failed to install/upgrade: il
> sottoprocesso post-installation script ha restituito un codice di errore 1
> Uname: Linux 2.6.28-15-generic i686
>

Shahar Or (mightyiam) wrote :

Alok,

Try 'sudo dpkg-reconfigure mysql-server-5.1' and to give it a new password. After that try to install phpmyadmin or 'sudo dpkg --configure -a' I think.

Saiph (fvondena) wrote :

I solve it:
add
/etc/mysql/my.cnf permission to user
Thank you.

alain tehayeur (gaslag) wrote :

Error occuring when cheking both mysql server and pma for install.
Easy to manage by installing mysql first.
Choose Abort on popup if you get an alert dialog.
Uninstall pma, install mysql server and modules as you need, apply.
Install pma and it's done.

Fiable.biz (fiable.biz) wrote :

This bug is still in Ubuntu 10.04.

Ricalsin (rcs) wrote :

I am experiencing it in 10.10 (Maverick).

Ricalsin (rcs) wrote :
Download full text (3.2 KiB)

I struggled with this before finally solving it, so take my notes with the understanding that I'm still blurry eyed:

I followed the instruction using synaptic and verified that php5 was loaded through the localhost/testing.php phase.
Next, loaded mysql USING the "mysql-server" package that "... is an empty package that depends on the current "best" version of mysql-server (currently mysql-server-5.1), as determined by the MySQLmaintainers. Install this package if in doubt about which MySQL version you need." Which, is mistake #1 -> just go to mysql-server-5.1 (as of today) and let it grab the dependencies.

I never checked the status of the mysql server before installing phpMyAdmin and that could have been one problem (as I was surprised at one point to find it off). It needs to be on.

Another problem was the installer that was trying to setup the sockets between mysql and phpMyAdmin (below). The installer was also trying to setup a database as some sort of initial db -> which, I'm not sure why that's needed (unless some people don't know how to set up a database, which is maybe intended for first timers). I finally said "no" and that seemed to help get through the installer.

The socket issue #1: By default the socket (mysqld.sock) is located at /var/run/mysqld/mysqld.sock but (I THINK) that file is non-existent when mysql is not running; at least, it was non-existent for me until I finally un-installed both mysql and phpMyAdmin again and then rechecked the mysql status before installing phpMyAdmin - it finally was there. Prior, it was not. Not exactly what solved it, but it definitely needs to be there before installing phpMyAdmin.

The socket issue #2: The "my.cnf" located at etc/mysql/my.cnf needs to have these lines:

[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock

..and it did for me. But it's mate, located in the php.ini file was missing this path. Find the php.ini file at etc/php5/apache2/php.ini and look for this section:

; Default port number for mysql_connect(). If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
; at MYSQL_PORT.
; http://php.net/mysql.default-port
mysql.default_port =

; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
; http://php.net/mysql.default-socket
mysql.default_socket =

...for me, both the port number (3306) and the path for the default port (/var/run/mysqld/mysqld.sock) were missing and needed to be installed manually.

You may need to restart the apache server. But you will definitely need to clear your browser's cookies and cache in order to login in to the phpMyAdmin interface (http://localhost/phpmyadmin)

In my view, the phpMyAdmin needs to check to make sure the mysql status is running. The installer needs to write the path and port of the socket in the php.ini file. And maybe the concern imposed by the installer to choose the creation of a database should be less - cause things went smooth after I just bypassed it.

(BTW: I've seen the non-Microsoft side of life. And I want to thank all ...

Read more...

Changed in phpmyadmin (Ubuntu):
assignee: nobody → mushtaque (mdmushtaqueansari9)
Changed in phpmyadmin (Debian):
assignee: nobody → mushtaque (mdmushtaqueansari9)
papukaija (papukaija) wrote :

@mushtaque: Please open a new bug if you still encounter issues with MySQL. Thanks in advance.

Changed in phpmyadmin (Ubuntu):
assignee: mushtaque (mdmushtaqueansari9) → nobody
Changed in phpmyadmin (Debian):
assignee: mushtaque (mdmushtaqueansari9) → nobody

For reoccurance with 4:4.0.10-1 on Ubuntu 14.04 see https://bugs.launchpad.net/ubuntu/+source/phpmyadmin/+bug/1324072

To post a comment you must log in.