Reputation: 4692
Wordpress cannot establish a connection to MariaDB
only connects to MySQL
Keep getting: Can’t select database
How to set Wordpress to connect to MariaDB
?
Disabling or Enabling MySQL doesn't help either
This too does NOT work
Here is the PhpMyAdmin database view
Upvotes: 1
Views: 1486
Reputation: 4692
Got it working.
I had to set up the sample Config file to look like below and save it as wp_config.php
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'wp_db' );
/** MySQL database username */
define( 'DB_USER', 'root' );
/** MySQL database password */
define( 'DB_PASSWORD', '' );
#Here is the MOST IMPORTANT of all
/** MySQL hostname */
define( 'DB_HOST', 'localhost:3307' );#IMPORTAT: Notice the :3307 that is the PORT for MariaDB
/** Database Charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );
/** The Database Collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );
And Voila! Somehow I spent days and hours of Googling and banging my head everywhere, but the solution was as simple as that.
Upvotes: 6