Hello, on step two, after typing in my database info, I get this error:

Failed to connect to your MySQL database server. MySQL reports the following message: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2).

    * Are you sure you have the correct username and password?
    * Are you sure that you have typed the correct database hostname?
    * Are you sure that the database server is running?

For more help, see the Installation and upgrading handbook. If you are unsure what these terms mean you should probably contact your hosting provider.

I know for a fact that all three questions asked in the error message are being met correctly. Any other ideas? I've tried it with v4 and 5 mySQL.



JoshuaB86’s picture

Anybody have any ideas? It's a rather cryptic error message.

JoshuaB86’s picture

Title: Failed to connect to MySQ database server » Failed to connect to MySQL database server

Puh-lease... I've done searching, but I cannot find anything that really pertains to my problem... or it needs a bit more explanation. Does anyone have any ideas? I'm on GoDaddy hosting.


JoshuaB86’s picture

Status: Active » Fixed

Ok, I found out, I needed to open the advanced menu and type in a custom host. :p That fixed it... localhost wasn't cutting it.

Viranil’s picture

I had the same problem when trying to set up Drupal 6.1 with a godaddy account (for the first time, I am an absolute Newbie). Besides entering the custom host information I had to enter the port number of the database server which was 3306. I found it by searching (ctrl+f "port") the admin documentation of the database host.

robinboast’s picture

I too am a newbie to drupal, though I have worked extensively on other CMSs, but I had the same exact problem trying to install 6.1 onto my Mac. The solution, as above, was to enter .local in the server under advanced, and designate the port as 3306. Leaving the server name as "localhost" simply doesn't work.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

floodDDDDDD’s picture

OMG! I was going to pull my hair out on this one.

Thanks so much - such a simple solution.

rmvbmaker’s picture

Version: 6.0 » 6.3
Assigned: JoshuaB86 » Unassigned
Category: support » bug
Priority: Normal » Critical
Status: Closed (fixed) » Active

I have the same problem with 6.3 and 6.x-dev, none of the tips above solve my problem.

Configuration of my host:

PHP Version 5.2.6

System Linux p3.51.net #1 SMP Wed May 28 09:01:00 CST 2008 i686
Build Date May 27 2008 21:17:25
Configure Command './configure' '--prefix=/usr/lib/php5.2.6' '--mandir=/usr/lib/php5.2.6/man' '--infodir=/usr/lib/php5.2.6/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '--with-libdir=lib' '--with-apxs2=/usr/sbin/apxs2' '--enable-cli' '--disable-cgi' '--with-config-file-path=/etc/php/apache-php5' '--with-config-file-scan-dir=/etc/php/apache-php5/ext-active' '--without-pear' '--enable-bcmath=shared' '--with-bz2=shared' '--enable-calendar=shared' '--without-curl' '--without-curlwrappers' '--disable-dbase' '--enable-exif=shared' '--without-fbsql' '--without-fdftk' '--disable-filter' '--disable-ftp' '--with-gettext=shared,/usr' '--with-gmp=shared' '--disable-hash' '--disable-ipv6' '--without-kerberos' '--enable-mbstring=shared' '--with-mcrypt=shared' '--with-mhash=shared' '--without-msql' '--without-mssql' '--without-ncurses' '--with-openssl=shared' '--with-openssl-dir=/usr' '--disable-pcntl' '--disable-pdo' '--without-pgsql' '--disable-posix' '--without-pspell' '--without-recode' '--disable-simplexml' '--disable-shmop' '--without-snmp' '--disable-soap' '--enable-sockets=shared' '--without-sybase' '--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem' '--disable-sysvshm' '--without-tidy' '--disable-tokenizer' '--disable-wddx' '--without-xmlrpc' '--with-xsl' '--enable-zip=shared' '--with-zlib=shared' '--disable-debug' '--enable-dba=shared' '--with-cdb' '--with-db4' '--without-flatfile' '--with-gdbm' '--without-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--enable-gd-jis-conv' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--without-xpm-dir' '--with-gd=shared' '--with-mysql=shared,/usr/lib/mysql' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-mysqli=shared,/usr/bin/mysql_config' '--with-readline' '--without-libedit' '--without-mm' '--without-sqlite'
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php/apache-php5
Loaded Configuration File /etc/php/apache-php5/php.ini
Scan this dir for additional .ini files /etc/php/apache-php5/ext-active
additional .ini files parsed /etc/php/apache-php5/ext-active/bcmath.ini, /etc/php/apache-php5/ext-active/bz2.ini, /etc/php/apache-php5/ext-active/calendar.ini, /etc/php/apache-php5/ext-active/dba.ini, /etc/php/apache-php5/ext-active/exif.ini, /etc/php/apache-php5/ext-active/gd.ini, /etc/php/apache-php5/ext-active/gmp.ini, /etc/php/apache-php5/ext-active/mbstring.ini, /etc/php/apache-php5/ext-active/mcrypt.ini, /etc/php/apache-php5/ext-active/mhash.ini, /etc/php/apache-php5/ext-active/mysql.ini, /etc/php/apache-php5/ext-active/mysqli.ini, /etc/php/apache-php5/ext-active/sockets.ini, /etc/php/apache-php5/ext-active/zlib.ini
PHP API 20041225
PHP Extension 20060613
Zend Extension 220060519
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
IPv6 Support disabled
Registered PHP Streams php, file, data, http, ftp, compress.bzip2, compress.zlib
Registered Stream Socket Transports tcp, udp, unix, udg
Registered Stream Filters string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*, bzip2.*, zlib.*

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies


PHP Credits


PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference Off Off
allow_url_fopen On On
allow_url_include Off Off
always_populate_raw_post_data Off Off
arg_separator.input & &
arg_separator.output & &
asp_tags On On
auto_append_file no value no value
auto_globals_jit On On
auto_prepend_file no value no value
browscap no value no value
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions set_time_limit set_time_limit
display_errors On On
display_startup_errors On On
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting 17 17
expose_php On On
extension_dir /usr/lib/php5.2.6/lib/php/extensions/no-debug-non-zts-20060613/ /usr/lib/php5.2.6/lib/php/extensions/no-debug-non-zts-20060613/
file_uploads On On
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors On On
ignore_repeated_source On On
ignore_user_abort Off Off
implicit_flush Off Off
include_path .: .:
log_errors On On
log_errors_max_len 1024 1024
magic_quotes_gpc Off Off
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
mail.force_extra_parameters no value no value
max_execution_time 300 300
max_input_nesting_level 64 64
max_input_time 300 300
memory_limit 128M 128M
open_basedir no value no value
output_buffering 4096 4096
output_handler no value no value
post_max_size 8M 8M
precision 14 14
realpath_cache_size 16K 16K
realpath_cache_ttl 120 120
register_argc_argv Off Off
register_globals Off On
register_long_arrays Off Off
report_memleaks On On
report_zend_debug On On
safe_mode Off Off
safe_mode_exec_dir no value no value
safe_mode_gid Off Off
safe_mode_include_dir no value no value
sendmail_from no value no value
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
serialize_precision 100 100
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 2M 2M
upload_tmp_dir no value no value
user_dir no value no value
variables_order GPCS GPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance On On
zend.ze1_compatibility_mode Off Off

Apache Version Apache
Apache API Version 20051115
Server Administrator [no address given]
Hostname:Port p3.51.net:0
User/Group nobody(65534)/5151
Max Requests Per Child: 0 - Keep Alive: off - Max Per Connection: 100
Timeouts Connection: 300 - Keep-Alive: 15
Virtual Server No
Server Root /usr/lib/apache2
Loaded Modules core prefork http_core mod_so mod_actions mod_alias mod_auth_basic mod_auth_digest mod_authn_anon mod_authn_dbd mod_authn_dbm mod_authn_default mod_authn_file mod_authz_dbm mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_owner mod_authz_user mod_autoindex mod_cgi mod_dbd mod_deflate mod_dir mod_env mod_expires mod_ext_filter mod_filter mod_headers mod_ident mod_imagemap mod_include mod_log_config mod_logio mod_mime mod_mime_magic mod_negotiation mod_rewrite mod_setenvif mod_speling mod_unique_id mod_usertrack mod_vhost_alias mod_php5

Directive Local Value Master Value
engine 1 1
last_modified 0 0
xbithack 0 0

Apache Environment
Variable Value
%{DOCUMENT_ROOT} /links/%0/
HTTP_HOST www.adrupal.com
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; GreenBrowser)
HTTP_COOKIE SESSc18049c324c96b320e1c0679fb6169a5=m3t05fpukt95fdvb0gdcc5tar0; has_js=1
PATH /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.2
SERVER_NAME www.adrupal.com
DOCUMENT_ROOT /usr/htdocs
SERVER_ADMIN [no address given]
SCRIPT_FILENAME /links/www.adrupal.com/drupal6/phpinfo.php
REQUEST_URI /drupal6/phpinfo.php
SCRIPT_NAME /drupal6/phpinfo.php

HTTP Headers Information
HTTP Request Headers
HTTP Request GET /drupal6/phpinfo.php HTTP/1.0
Host www.adrupal.com
Accept-Encoding none
Connection close
Accept */*
Accept-Language zh-cn
User-Agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; GreenBrowser)
Cookie SESSc18049c324c96b320e1c0679fb6169a5=m3t05fpukt95fdvb0gdcc5tar0; has_js=1
HTTP Response Headers
X-Powered-By PHP/5.2.6
Cache-Control max-age=1
Expires Thu, 24 Jul 2008 01:33:09 GMT
Connection close
Content-Type text/html

BCMath support enabled

BZip2 Support Enabled
Stream Wrapper support compress.bz2://
Stream Filter support bzip2.decompress, bzip2.compress
BZip2 Version 1.0.4, 20-Dec-2006

Calendar support enabled

ctype functions enabled

date/time support enabled
"Olson" Timezone Database Version 2008.2
Timezone Database internal
Default timezone Asia/Chongqing

Directive Local Value Master Value
date.default_latitude 31.7667 31.7667
date.default_longitude 35.2333 35.2333
date.sunrise_zenith 90.583333 90.583333
date.sunset_zenith 90.583333 90.583333
date.timezone no value no value

DBA support enabled
Supported handlers gdbm cdb cdb_make db4 inifile flatfile

DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.6.30
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support enabled

EXIF Support enabled
EXIF Version 1.4 $Id: exif.c,v 2008/03/12 17:33:14 iliaa Exp $
Supported EXIF Version 0220
Supported filetypes JPEG,TIFF

GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.3.4
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
JIS-mapped Japanese Font Support enabled

gmp support enabled
GMP version 4.2.2

iconv support enabled
iconv implementation glibc
iconv library version 2.6.1

Directive Local Value Master Value
iconv.input_encoding ISO-8859-1 ISO-8859-1
iconv.internal_encoding ISO-8859-1 ISO-8859-1
iconv.output_encoding ISO-8859-1 ISO-8859-1

json support enabled
json version 1.2.1

libXML support active
libXML Version 2.6.30
libXML streams enabled

Multibyte Support enabled
Multibyte string engine libmbfl
Multibyte (japanese) regex support enabled
Multibyte regex (oniguruma) version 4.4.4
Multibyte regex (oniguruma) backtrack check On

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Directive Local Value Master Value
mbstring.detect_order no value no value
mbstring.encoding_translation Off Off
mbstring.func_overload 0 0
mbstring.http_input pass pass
mbstring.http_output pass pass
mbstring.internal_encoding no value no value
mbstring.language neutral neutral
mbstring.strict_detection Off Off
mbstring.substitute_character no value no value

mcrypt support enabled
Version 2.5.7
Api No 20021217
Supported ciphers cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes
Supported modes cbc cfb ctr ecb ncfb nofb ofb stream

Directive Local Value Master Value
mcrypt.algorithms_dir no value no value
mcrypt.modes_dir no value no value

MHASH support Enabled
MHASH API Version 20060101

MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 5.0.44
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient

Directive Local Value Master Value
mysql.allow_persistent Off Off
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket /var/run/mysqld/s0 /var/run/mysqld/s0
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.servers 3 3
mysql.socket_path /var/run/mysqld/s /var/run/mysqld/s
mysql.trace_mode Off Off

MysqlI Support enabled
Client API library version 5.0.44
Client API header version 5.0.44
MYSQLI_SOCKET /var/run/mysqld/mysqld.sock

Directive Local Value Master Value
mysqli.default_host no value no value
mysqli.default_port 3306 3306
mysqli.default_pw no value no value
mysqli.default_socket no value no value
mysqli.default_user no value no value
mysqli.max_links Unlimited Unlimited
mysqli.reconnect Off Off
mysqli.servers 3 3
mysqli.socket_file /var/run/mysqld/s /var/run/mysqld/s

PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 7.6 2008-01-28

Directive Local Value Master Value
pcre.backtrack_limit 100000 100000
pcre.recursion_limit 100000 100000

Reflection enabled
Version $Id: php_reflection.c,v 2008/03/13 15:56:21 iliaa Exp $

Session Support enabled
Registered save handlers files user
Registered serializer handlers php php_binary

Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 Off Off
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_httponly Off Off
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 1000 1000
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.hash_bits_per_character 5 5
session.hash_function 0 0
session.referer_check no value no value
session.save_handler files files
session.save_path no value no value
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid 0 0

Sockets Support enabled

SPL support enabled
Interfaces Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilterIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RegexIterator, RuntimeException, SplFileInfo, SplFileObject, SplObjectStorage, SplTempFileObject, UnderflowException, UnexpectedValueException

Regex Library Bundled library enabled
Dynamic Library Support enabled
Path to sendmail /usr/sbin/sendmail -t -i

Directive Local Value Master Value
assert.active 1 1
assert.bail 0 0
assert.callback no value no value
assert.quiet_eval 0 0
assert.warning 1 1
auto_detect_line_endings 0 0
default_socket_timeout 60 60
safe_mode_allowed_env_vars PHP_ PHP_
safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH
url_rewriter.tags a=href,area=href,frame=src,input=src,form=fakeentry a=href,area=href,frame=src,input=src,form=fakeentry
user_agent no value no value

XML Support active
XML Namespace Support active
libxml2 Version 2.6.30

XMLReader enabled

XMLWriter enabled

XSL enabled
libxslt Version 1.1.22
libxslt compiled against libxml Version 2.6.30
EXSLT enabled
libexslt Version 1.1.22

Zend Optimizer
Optimization Pass 1 enabled
Optimization Pass 2 enabled
Optimization Pass 3 enabled
Optimization Pass 4 enabled
Optimization Pass 9 enabled
Zend Loader enabled
License Path no value
Obfuscation level 3

ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.2.3
Linked Version 1.2.3

Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value

Additional Modules
Module Name

Variable Value
TERM xterm
SHELL /bin/bash
USER root
PATH /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.2
PWD /udata/k2/2/ku68862/public_html
SVCNAME apache2
HOME /root
_ /sbin/start-stop-daemon

PHP Variables
Variable Value
_REQUEST["SESSc18049c324c96b320e1c0679fb6169a5"] m3t05fpukt95fdvb0gdcc5tar0
_REQUEST["has_js"] 1
_COOKIE["SESSc18049c324c96b320e1c0679fb6169a5"] m3t05fpukt95fdvb0gdcc5tar0
_COOKIE["has_js"] 1
_SERVER["%{DOCUMENT_ROOT}"] /links/%0/
_SERVER["HTTP_HOST"] www.adrupal.com
_SERVER["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; GreenBrowser)
_SERVER["HTTP_COOKIE"] SESSc18049c324c96b320e1c0679fb6169a5=m3t05fpukt95fdvb0gdcc5tar0; has_js=1
_SERVER["PATH"] /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.2
_SERVER["SERVER_NAME"] www.adrupal.com
_SERVER["DOCUMENT_ROOT"] /usr/htdocs
_SERVER["SERVER_ADMIN"] [no address given]
_SERVER["SCRIPT_FILENAME"] /links/www.adrupal.com/drupal6/phpinfo.php
_SERVER["REQUEST_URI"] /drupal6/phpinfo.php
_SERVER["SCRIPT_NAME"] /drupal6/phpinfo.php
_SERVER["PHP_SELF"] /drupal6/phpinfo.php
_SERVER["REQUEST_TIME"] 1216863188

PHP License
This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact license@php.net.

oriol_e9g’s picture

Category: bug » support
rmvbmaker’s picture

Category: support » bug
Bart Jansens’s picture

Category: bug » support
ainigma32’s picture

Status: Active » Fixed

Looks rmvbmaker got his/her site up and running so I'm setting this to fixed.

Feel free to reopen if you think that is wrong.

- Arie

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

magicg’s picture

Issue tags: +Drupal, +MySQL, +installing issues

On localhost installing try this:

Easy Troubleshooting

venugopalchintu’s picture

Version: 6.3 » 6.22
Assigned: Unassigned » venugopalchintu
Category: support » bug
Status: Closed (fixed) » Active

Failed to connect to your MySQL database server. MySQL reports the following message: Access denied for user 'venu'@'localhost' (using password: NO).

* Are you sure you have the correct username and password?
* Are you sure that you have typed the correct database hostname?
* Are you sure that the database server is running?

For more help, see the Installation and upgrading handbook. If you are unsure what these terms mean you should probably contact your hosting provider.

iam having the Same Problem ...

So any of you can Reply to this bug report ...

Damien Tournoud’s picture

Category: bug » support
Status: Active » Closed (won't fix)

I'm sorry, but we don't handle support requests in the Drupal Core issue queue as a regular practice. There are several support options listed if you click on "Community and Support" at the top of Drupal.org, which will take you to: http://drupal.org/community.

There you can find out about the Drupal IRC channels, and the Forums, which are our two main support mechanisms in the Drupal community.

Good luck with your issue!