I could not find an answer. Have a production website with production DB. Have backed up the DB and restored to a development environment where I also created a development website in the same server, same cPanel, same user and same password for both DBs. Is a Magento platform 1.9.2, although I do not think is important. Here is the issue: I can execute SQL in the development DB but the same SQL sentence would not execute in the production DB. Also I have uploaded WP to the development and isntalled using the development db for the magento installation, but when I try to run the WP installation for the production site, WP replies "We were able to connect to the database server". Remote MySQL, firewall, etc are the same for both DB, what could be the cause of this and how do I solve it? Thank you.Answer1:
We were able to connect to the database server means WP <em>can</em> connect to the database, but the user or password or permissions are wrong.
Are you sure database user in
wp-config.php has adequate permissions for the database? Try giving the user all privileges, i.e. SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES for the database.
WP_DEBUG to find any php errors that may indicate other connection issues.
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
in wp-config.php and the debug.log file will be in
And optionally add this
define( 'WP_DEBUG_DISPLAY', true);
to wp-config.php to log and dump them to the browser.
See <a href="https://codex.wordpress.org/WP_DEBUG" rel="nofollow">https://codex.wordpress.org/WP_DEBUG</a>