I encounter a really weird issue. I'm moving my CiviCRM install from an Ubuntu 14.04 server to an Ubuntu 16.04 server. Mysql is now 5.7.21.
CiviCRM version is the latest 4.7.30
The default SQL mode only_full_group_by is disabled.
If I connect using the terminal from the same localhost using the same username/password (I triple triple triple checked), it runs like a charm.
The CiviCRM page always shows a DB Error: unknown error (duh!). Enabling the backtrace gives me more info:
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] =>
SELECT v.name as name ,v.value as value, v.grouping as grouping
FROM civicrm_option_value_en_US v,
civicrm_option_group_en_US g
WHERE v.option_group_id = g.id
AND g.name = 'wysiwyg_presets'
AND g.is_active = 1 AND v.is_active = 1 AND ( v.component_id IS NULL OR v.component_id IN (SELECT id FROM civicrm_component WHERE name IN ("CiviEvent","CiviMember","CiviMail","CiviReport")) ) ORDER BY v.weight [nativecode=1045 ** Access denied for user 'civietui'@'localhost' (using password: YES)]
Any help much appreciated
Update
If I deliberately use a wrong username or password, I have a different error:
Initialization Error
It shows that somehow, Civi connects to the DB up to a certain point
update 2
mysql> show grants for username@localhost;
| Grants for username@localhost |
| GRANT USAGE ON . TO 'username'@'localhost' |
| GRANT ALL PRIVILEGES ON civicrm_DB
.* TO 'username'@'localhost' WITH GRANT OPTION |