mysql 5.7 new feature default use socket connect (not password)
I install mysql var apt in Ubuntu 18.04, but not asks for a password. and can not connect to mysql without password.
user@user:~$ mysql -u root
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
user@user:~$ mysql -u root
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
Solution
add a sudo and it works. fxxk.
user@user:~$ sudo mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 5.7.22 MySQL Community Server (GPL)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
DO NOT WANT CODING ANY MORE, NO CODE IS THE BEST CODE.
mysql 5.7 new feature default use socket connect (not password)
I install mysql var apt in Ubuntu 18.04, but not asks for a password. and can not connect to mysql without password.
Solution
add a sudo and it works. fxxk.
DO NOT WANT CODING ANY MORE, NO CODE IS THE BEST CODE.
Thanks to https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1752215/comments/3