Garrett Sanderson Garrett Sanderson - 3 months ago 14
MySQL Question

WordPress Install Error [Unknown character set: 'utf']

I am trying to install the latest version of WordPress(4.6.1) in a local dev project environment. I just got a new iMac and I am in the process of moving my local instances of my projects to the new machine.

I am using Sequel Pro (v 1.1.2) to manage my databases & MAMP (3.4) to run my local server.

The connection to the database works as intended and I get to step 2 of the installation process however after putting in the following:

Site Title,
Username,
Password,
email,

I click install and get the following errors and no tables are created in my database.

Any help would be greatly appreciated. I am sure its something dumb. Just need another set of eyes. Thanks!

WordPress database install error:

WordPress database error: [Unknown character set: 'utf']
CREATE TABLE wp_users ( ID bigint(20) unsigned NOT NULL auto_increment, user_login varchar(60) NOT NULL default '', user_pass varchar(255) NOT NULL default '', user_nicename varchar(50) NOT NULL default '', user_email varchar(100) NOT NULL default '', user_url varchar(100) NOT NULL default '', user_registered datetime NOT NULL default '0000-00-00 00:00:00', user_activation_key varchar(255) NOT NULL default '', user_status int(11) NOT NULL default '0', display_name varchar(250) NOT NULL default '', PRIMARY KEY (ID), KEY user_login_key (user_login), KEY user_nicename (user_nicename), KEY user_email (user_email) ) DEFAULT CHARACTER SET utf-8

WordPress database error: [Unknown character set: 'utf']
CREATE TABLE wp_usermeta ( umeta_id bigint(20) unsigned NOT NULL auto_increment, user_id bigint(20) unsigned NOT NULL default '0', meta_key varchar(255) default NULL, meta_value longtext, PRIMARY KEY (umeta_id), KEY user_id (user_id), KEY meta_key (meta_key(191)) ) DEFAULT CHARACTER SET utf-8

WordPress database error: [Unknown character set: 'utf']
CREATE TABLE wp_termmeta ( meta_id bigint(20) unsigned NOT NULL auto_increment, term_id bigint(20) unsigned NOT NULL default '0', meta_key varchar(255) default NULL, meta_value longtext, PRIMARY KEY (meta_id), KEY term_id (term_id), KEY meta_key (meta_key(191)) ) DEFAULT CHARACTER SET utf-8


wp-config.php file

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf-8');


The database itself is set at:

Database Encoding: UTF-8 Unicode (utf8)

Database Collation: utf8_general_ci

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

WordPress Codex