• When i use Change Database Prefix option, message appears at the bottom of the page:

    Warning: mysqli::mysqli() [mysqli.mysqli]: (HY000/2005): Unknown MySQL server host ‘sql.myserver.pl:3307:’ (2) in /home/myserver/ftp/mysite/wp-content/plugins/all-in-one-wp-security-and-firewall/admin/wp-security-database-menu.php on line 526

    Error – Could not get tables or no tables found!

    Once already changed the prefix without problems (a few days ago), now is not working.
    To make sure your plugin installed on another fresh installation of wordpress and also does not work change the prefix.
    The next time I checked on another page, and another server also does not work.
    Can you help me?

    Information
    Plugin Version: 3.7.1
    WP Version: 3.8.1
    WPMU: No
    MySQL Version: 5.5.25
    PHP Version: 5.3.27

    https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor wpsolutions

    (@wpsolutions)

    This sounds like somehow the code which connects to the DB is unable to resolve correctly for your host.

    We use the following code to connect to your DB:
    $mysqli = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);

    The “DB_HOST” usually has a value of “localhost” and I suspect that this parameter is causing the problem.

    If as you say this was working a few days ago, I would firstly contact your host provider and ask them if they have changed the hostname to anything other than “localhost” or if they’ve done anything else which may affect the DB login functionality I described above.

    Thread Starter PhdRA

    (@phdra)

    Again, I checked how the plug-in on a new installation of wordpress! and on another server! still not working, the host is localhost.
    If you try to change the prefix displays the message:

    Fatal error: Call to undefined method mysqli_result :: fetch_all () in / wp-content/plugins/all-in-one-wp-security-and-firewall/admin/wp-security-database-menu.php on line 534

    Successful tryin that moved did on an earlier version of the plug – or it could be the cause?

    Plugin Contributor wpsolutions

    (@wpsolutions)

    Fatal error: Call to undefined method mysqli_result :: fetch_all ()

    You are getting this error because your server does not have the mysqlnd driver which is required for the “fetch_all” method.
    See this for more info: http://www.php.net/manual/en/mysqli-result.fetch-all.php

    I want to try an alternative method which will hopefully cater for host setups like yours which are on servers without some of the mysql drivers.

    But – I would need you to test and verify it. Can you please get in contact with us using the below contact form so we can send you an updated zip file so you can try it out for us?
    http://support.tipsandtricks-hq.com/contact

    Hi,

    I’ve had the same message, the cause was due to the “complex name” of my DB:
    i’ve created the DB “wp_4.1”.
    Then What’s the hell going on ?????

    The DOT between 4 and 1! Why?

    open the file wp-content/plugins/all-in-one-wp-security-and-firewall/admin/wp-security-database-menu.php and go to line 542:
    the SQL request is : $list_tables_sql = “SHOW TABLES FROM {$database};”
    then the SQL expression don’t take the entire name “wp_4.1” because the variable {$database} is not “protected” …..

    To resolve that little bug, add a “`” character (ALT Gr + 7) around {$database} variable!

    then you have the new line: $list_tables_sql = “SHOW TABLES FROM {$database};”

    It works for me 😉

    Hi,

    I’ve had the same message, the cause was due to the “complex name” of my DB:
    i’ve created the DB “wp_4.1”.
    Then What’s the hell going on ?????

    The DOT between 4 and 1! Why?

    open the file wp-content/plugins/all-in-one-wp-security-and-firewall/admin/wp-security-database-menu.php and go to line 542:
    the SQL request is : $list_tables_sql = “SHOW TABLES FROM {$database};”
    then the SQL expression don’t take the entire name “wp_4.1” because the variable {$database} is not “protected” …..

    To resolve that little bug, add a “`” character (ALT Gr + 7) around {$database} variable!

    then you have the new line: $list_tables_sql = “SHOW TABLES FROM ‘{$database}’;”

    It works for me 😉

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi pc-net-assistance.fr, thank you for reporting your solution. One of the plugin developers will check your code further.

    Regards

    Plugin Contributor wpsolutions

    (@wpsolutions)

    hi pc-net-assistance.fr,
    thanks. we will add the backticks to the next release.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Change Database Prefix – don't work’ is closed to new replies.