VVV: Permissions error [1698 (28000)] attempting to access mysql root from shell without sudo
Current Behavior
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
Expected Behavior
MariaDB [(none)]>
Steps to Reproduce (for bugs)
vagrant destroy
vagrant box update
vagrant up --provision
then:
$ vagrant ssh
Running additional site vagrant customfile at /Users/paul/.dev/vagrant-local/www/paulschreiber/provision/Customfile
✧ Hello Again! ✧ ✧ ✧
✧ ▄▀▀▀▄▄▄▄▄▄▄▀▀▀▄ ✧ __ __ __ __
✧█▒▒░░░░░░░░░▒▒█ \ V\ V\ V /
▄▄ █░░█░░░░░█░░█ ✧ \_/\_/\_/
█░░█ █░░░▀█▀░░░█ ✧ ✧
█░░█ ▀▄░░░░░░░▄▀ ✧ Have a nice day :)
vagrant@vvv:~$ mysql
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
vagrant@vvv:~$ sudo mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 36
Server version: 10.4.13-MariaDB-1:10.4.13+maria~bionic mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
Your Environment
macOS 10.14.15
VirtualBox 6.0.20
Vagrant 2.29
VVV develop branch (7 May)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (15 by maintainers)
Out of the box It appears that to use the
rootuser on CLI, you need tosudo mysqlhttps://askubuntu.com/questions/766334/cant-login-as-mysql-user-root-from-normal-user-account-in-ubuntu-16-04
So it doesn’t matter if the credentials are correct, it’s requiring
sudoby design.Additional steps will be needed if we want to undo this