mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
60 lines
2.1 KiB
SQL
60 lines
2.1 KiB
SQL
This is a note for MySQL 5.7 Users
|
|
----------------------------------
|
|
|
|
In 5.7 (e.g. on Ubuntu 16.04) there is a new authentication schema
|
|
https://dev.mysql.com/doc/mysql-security-excerpt/5.7/en/socket-authentication-plugin.html
|
|
and authentication as in the previous database versions, will not work.
|
|
|
|
As a quick solution, you can restore the old authentication as follows:
|
|
|
|
root@ubuntu16:/home/ntop# mysql -uroot -hlocalhost
|
|
Welcome to the MySQL monitor. Commands end with ; or \g.
|
|
Your MySQL connection id is 3
|
|
Server version: 5.7.13-0ubuntu0.16.04.2 (Ubuntu)
|
|
|
|
Copyright (c) 2000, 2016, 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> ^DBye
|
|
|
|
root@ubuntu16:/home/ntop# mysql -uroot -h127.0.0.1
|
|
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
|
|
|
|
root@ubuntu16:/home/ntop# mysql -uroot -hlocalhost
|
|
Welcome to the MySQL monitor. Commands end with ; or \g.
|
|
Your MySQL connection id is 5
|
|
Server version: 5.7.13-0ubuntu0.16.04.2 (Ubuntu)
|
|
|
|
Copyright (c) 2000, 2016, 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> update mysql.user set plugin="mysql_native_password";
|
|
Query OK, 1 row affected (0,00 sec)
|
|
Rows matched: 3 Changed: 1 Warnings: 0
|
|
mysql> flush privileges;
|
|
Query OK, 0 rows affected (0,01 sec)
|
|
mysql> ^DBye
|
|
|
|
|
|
root@ubuntu16:/home/ntop# mysql -uroot -h127.0.0.1
|
|
Welcome to the MySQL monitor. Commands end with ; or \g.
|
|
Your MySQL connection id is 8
|
|
Server version: 5.7.13-0ubuntu0.16.04.2 (Ubuntu)
|
|
|
|
Copyright (c) 2000, 2016, 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.
|