Page MenuHomePhabricator

Installation Fails due to SQL database problem
Closed, InvalidPublic


Author: thatotherdude

Heres what i get when i click "install" on my Fedora Red Hat Linux (latest
build) running SQL (um... the one that came with my system) and PHP 5.something.
I'm really sorry i don't know the specifics... if someone could even help me
out by telling me where to find em that would be great, I'm very Linux newb and
i've been stalled on this problem for weeks. I guess it cant connect to my own
machine... i just dont understand why.


Here's the error message:
Checking environment...

  • PHP 5.0.4: ok
  • PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title)
  • Have XML / Latin1-UTF-8 conversion support.
  • PHP's memory_limit is 8M. If this is too low, installation may fail!

Attempting to raise limit to 20M... ok.

  • Have zlib support; enabling output compression.
  • Neither Turck MMCache nor eAccelerator are installed, can't use object

caching functions

  • Found GNU diff3: /usr/bin/diff3.
  • Found ImageMagick: /usr/bin/convert; image thumbnailing will be enabled if

you enable uploads.

  • Installation directory: /var/www/html
  • Script URI path:
  • Trying to connect to MySQL on localhost as root... Warning: mysql_query(): supplied argument is not a valid MySQL-Link

resource in /var/www/html/includes/Database.php on line 374

A database error has occurred Query: SET NAMES utf8 Function: Error: 2002

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
(13) (localhost) Backtrace: GlobalFunctions.php line 451 calls wfBacktrace()
Database.php line 408 calls wfDebugDieBacktrace() Database.php line 358 calls
Database::reportQueryError() Database.php line 253 calls Database::query()
Database.php line 175 calls Database::open() Database.php line 187 calls
Database::Database() index.php line 484 calls Database::newFromParams()

Version: 1.5.x
Severity: blocker
OS: Linux
URL: localhost



Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 8:58 PM
bzimport set Reference to bz4186.
bzimport added a subscriber: Unknown Object (MLST).

In your mysql conf file there should be a commented parameter
that looks like:
#port = 3306

Remote the sharp:
port = 3306

Then restart mysqld ( as root: /etc/init.d/mysqld restart )

For help / support, feel free to come on irc irc://

oh and to get version of installed software, you can often use
the --version switch. Examples:

php --version
mysql --version

thatotherdude wrote:

k, i got my version numbers, but i cant download irc.
php is version 5.0.4
mysql is version 4.1.11

I think that port thing would solve my problem however i dont even know where
sql files are stored :P

If someone could tell me how to access my conf file (as mentioned above) that
would help a ton!



or /etc/mysql/my.cnf

make sure you look at your distribution documentation :)

thatotherdude wrote:

wow this is bad, i thought i was moderately tech savy.... i found the file, but
theres no commented out port number

Heres the entire document:

  1. Default to using old password format for compatibility with mysql 3.x
  2. clients (those using the mysqlclient10 compatibility package).




Also where is this distribution documentation your talking about.

Thanks again for your help,

Raphael.Becker wrote:

Similar problem here (mediawiki 1.5.3, MySQL 5.0.15, PHP 5.1.1):

Using a database-server other than localhost results in adding a
MySQL-permission for Host='%' in the mysql.user and mysql.db databases when
using the automatic setup (under mysql-root). Everything runs fine from the
mysql-shell, when loggin in with the wiki-user and the wiki-passwd using "-h
localhost" (default), but fails with using "-h", if this
resolves into anything else but but is still on the "local host"
(using an interface-IP for example)

Manual Fix: Changeing the Host '%' for wikiuser in mysql.db and mysql.user to
the real systems name (DNS reverse lookup) and doing "flush privileges" is all
to get it working.

Suggested fix: Don't use '%' in the 'Host'-column but try to determine the
"incoming"-IP address ( for example) when setting up the tables
using MySQL-root user and use this value instead.

I didn't find out when (which release) MySQL broke Host='%'.

Raphael Becker

robchur wrote:

MySQL configuration issue, not our problem.