The reason is that recent Ubuntu installation (maybe others also),
mysql is using by default the UNIX or auth_socket plugin.
1. set root user to mysql_native_password
$ sudo mysql -u root -p # I had to use “sudo” since is new installation
mysql:~ USE mysql;
SELECT User, Host, plugin FROM mysql.user;
mysql:~ UPDATE user SET plugin=’mysql_native_password’ WHERE User=’root’;
mysql:~ FLUSH PRIVILEGES;
mysql:~ exit;
$ service mysql restart
2. Add new db_user with you system_user(recommended)
$ sudo mysql -u root # I had to use “sudo” since is new installation
mysql:~ USE mysql;
mysql:~ CREATE USER ‘YOUR_SYSTEM_USER’@’localhost’ IDENTIFIED BY ”;
mysql:~ GRANT ALL PRIVILEGES ON * . * TO ‘YOUR_SYSTEM_USER’@’localhost’;
mysql:~ UPDATE user SET plugin=’auth_socket’ WHERE User=’YOUR_SYSTEM_USER’;
mysql:~ FLUSH PRIVILEGES;
mysql:~ exit;
$ service mysql restart
Remember that if you use option #2 you’ll have to connect to mysql as your system username (mysql -u YOUR_SYSTEM_USER)
Short further steps
create database,tables,attributes, insert data
MySQL Connector/J use it inside your java project
connect with the path
Nguồn: https://keralafolkloreakademy.com/
Xem thêm bài viết khác: https://keralafolkloreakademy.com/giai-tri/
Xem thêm Bài Viết:
- Locked Away – R. City ft. Adam Levine (Lyrics)
- Lộc đỉnh ký (45/92) – Full truyện kiếm hiệp Kim Dung
- Cách Lọc Bạn Bè Không Tương Tác Facebook Dễ Dàng 2020 | Lý Thành Nguyên
- Rối loạn kinh nguyệt ở tuổi 40 và cách khắc phục
- Yến chưng sẵn có tốt không ? 4 Lợi Ích Vượt Trội của Yến Chưng Sẵn TPHCM
DO SUBSCRIBE CHANNEL. For more interesting content.
you've saved me bro
i think I am the only one who failed. I am using ubuntu 18.04, i do not get any respond back after I enter the commands 🙁
thanks bro!
You saved me man, 1Million thanks 🙂
Thank you , It helped a lot!!.
Thanks for your detailed explanation, very helpful
Those of you who are having problem with method 2,
use "mysqladmin -u [YOUR_USER] password" to create new password for user and that may work.
Hi. Nice video with good content. Can you please let me know how can get password for root. I forgot root password
thanks it workes for me
Thanks, mate! I was starting to get really frustrated by not being able to open it
ty bro!! you saved me!! 🙂
Thank you. the first solution worked for me
which version of workbench are you using?
Thankssssssss
Thanks u Bro, u saved me :DDD
Thanks sir , its worked
I love you
works on version: 10.1.37-MariaDB-0+deb9u1 Debian 9.6, thx buddy
You are the best dude! God bless you!
Thank u!!
gracias amigo!
method 1 help me kill error. Tks youuuuuu!
Thanks Suman.. you solved my problem..
thanks a lot!
Many thanks for this 🙂
Great explanation and solutions. Sol1 helped solve my problem.
I love you so much, you have saved my ass on this one!
Mestre
Thanks bro..!
Thanks friend
When i maked my installation, i used ( alter user 'root'@'localhost' identified with mysql_native_password by 'password here' ) and this auth_sockt didn't happen to me. Could be a way, idk
What a great help! Thanks a lot.
thanks bro! you are amazing!
I wish I could upvote this more than once.
Thanks a lot!
I'M REALLY GRATEFUL. THANK YOU VERY MUCH!!!
Thanks!!! This help me so much!
Your Conky is interesting, would it be possible to have the .conkyrc file?