I just installed a fresh ubuntu 16.04, I installed mysql on it, but when I tried to enter it
$ mysql -uroot an error is issued
ERROR 1698 (28000): Access denied for user 'root' @ 'localhost'
Although, I still can go there through
$ sudo mysql -uroot Tell me how to do that from under a regular user to go there?
added from comment:
Put through
$ sudo apt-get install mysql-server $ sudo apt-get install mysql-client I was asked to set a password for the mysql root user, I left it empty, and if I try to log in with the -p flag, the system asks for a password, I press enter, and I get the same error.
mysql -u root -p? 4. In the home directory of the user under whose name you work, there is a file.my.cnf? 5..my.cnfthere a.my.cnffile in the root user home directory? - aleksandr barakinsudo apt-get install mysql-serverthroughsudo apt-get install mysql-serverandsudo apt-get install mysql-client, but it was suggested, I left empty, if I try to enter with the -p flag, the system asks for a password, I press enter, and I get the same error. The .my.cnf file is not in~or in/root- Ghost16~/.my.cnfwith the appropriate content . - aleksandr barakin