Join the community today
Register Now

Wordpress MySQL Connection Error / CentMin Option 22 / WordPress Install

Discussion in 'Blogs & CMS usage' started by connectivityengineer, Mar 13, 2016.

  1. connectivityengineer

    connectivityengineer New Member

    15
    5
    3
    Feb 27, 2016
    Ratings:
    +10
    Local Time:
    5:44 AM
    1.9.12
    10
    Installing WordPress via Option 22 on the menu

    Install completed however - the site errors with a message stating it cannot connect to the database.
    We are however able to connect to the database using credentials within the wp-config file.

    We thought it strange - and so we then went and created a brand new vps
    installed the latest centminmod - and tried again - same thing

    Any thoughts?
     
  2. eva2000

    eva2000 Administrator Staff Member

    31,023
    6,925
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,431
    Local Time:
    8:44 PM
    Nginx 1.13.x
    MariaDB 5.5
    what's the listed mysql host, username, password and database name listed in wp-config.php ? wrap in CODE tags :)

    what's exact error message you get ? where do you get it ? within browser ?

    output for these commands in CODE tags too
    Code (Text):
    php -v
    php -m
     
  3. connectivityengineer

    connectivityengineer New Member

    15
    5
    3
    Feb 27, 2016
    Ratings:
    +10
    Local Time:
    5:44 AM
    1.9.12
    10
    I have tried a few php version -
    In short - the installer itself should have built the config file - (which it did btw)

    Error shows in browser

    Code:
    PHP Modules
    bcmath
    bz2
    calendar
    Core
    ctype
    curl
    date
    dom
    enchant
    ereg
    exif
    filter
    ftp
    gd
    geoip
    gettext
    gmp
    hash
    iconv
    igbinary
    imagick
    imap
    intl
    json
    libxml
    mbstring
    mcrypt
    memcache
    memcached
    mhash
    mongo
    mysql
    mysqli
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    pdo_sqlite
    Phar
    posix
    pspell
    readline
    redis
    Reflection
    session
    shmop
    SimpleXML
    snmp
    soap
    sockets
    SPL
    sqlite3
    standard
    sysvmsg
    sysvsem
    sysvshm
    tidy
    tokenizer
    xml
    xmlreader
    xmlrpc
    xmlwriter
    xsl
    Zend OPcache
    zip
    zlib
    
    [Zend Modules]
    Zend OPcache
    
    php -v
    PHP 5.4.45 (cli) (built: Mar 13 2016 10:18:26)
    Copyright (c) 1997-2014 The PHP Group
    Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.5, Copyright (c) 1999-2015, by Zend Technologies



    happens with all versions of php even 5.x - 7.x

    gimme a bit to pass a little more info
     
  4. connectivityengineer

    connectivityengineer New Member

    15
    5
    3
    Feb 27, 2016
    Ratings:
    +10
    Local Time:
    5:44 AM
    1.9.12
    10
    sorry on the road - so not the best connection

    The Same user/pass in the wp-config DOES NOT WORK via php but does from command line

    wp-config file works on another host just fine as well

    :-(
    PHP:
    // ** MySQL settings ** //
    /** The name of the database for WordPress */
    define('DB_NAME''wp1726db_4389');

    /** MySQL database username */
    define('DB_USER''wpdb4389u20976');

    /** MySQL database password */
    define('DB_PASSWORD''wpdbyxj3WxHPjqyop31387');

    /** MySQL hostname */
    define('DB_HOST''localhost');

    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET''utf8');
     
  5. eva2000

    eva2000 Administrator Staff Member

    31,023
    6,925
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,431
    Local Time:
    8:44 PM
    Nginx 1.13.x
    MariaDB 5.5
    strange indeed.. what's the exact error message reported by wordpress on frontend ?
     
  6. connectivityengineer

    connectivityengineer New Member

    15
    5
    3
    Feb 27, 2016
    Ratings:
    +10
    Local Time:
    5:44 AM
    1.9.12
    10
     
  7. eva2000

    eva2000 Administrator Staff Member

    31,023
    6,925
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,431
    Local Time:
    8:44 PM
    Nginx 1.13.x
    MariaDB 5.5
    Last edited: Mar 17, 2016
  8. connectivityengineer

    connectivityengineer New Member

    15
    5
    3
    Feb 27, 2016
    Ratings:
    +10
    Local Time:
    5:44 AM
    1.9.12
    10
    YES -

    In short - a very simple php file that does a test connection to the database does not work
    still debugging however
     
  9. johnnyc

    johnnyc Member

    33
    2
    8
    Mar 23, 2015
    Ratings:
    +2
    Local Time:
    4:44 AM
    did you ever figure this out?

    I'm having this exact issue right now.