I tried to below OS installed on my laptop
Mint version 19,
Code name : Tara,
PackageBase : Ubuntu Bionic
Cinnamon (64-bit)
I have installed mysql-server using below command:
xxxxxxx:~$ sudo apt-get install mysql-server
During this installation I was not prompted to enter any root password. TO see if installation was successful, I ran below command:
xxxxxxxxxx:~$ mysql -V
mysql Ver 14.14 Distrib 5.7.23, for Linux (x86_64) using EditLine wrapper
xxxxxxxxxx:~$ sudo service mysql status
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2018-09-30 21:59:42 EDT; 9s ago
Main PID: 3518 (mysqld)
Tasks: 27 (limit: 4915)
CGroup: /system.slice/mysql.service
└─3518 /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid
Sep 30 21:59:41 globallogic systemd[1]: Starting MySQL Community Server...
Sep 30 21:59:42 globallogic systemd[1]: Started MySQL Community Server.
As I was not prompted to set any root password, I thought of setting root password.
xxxxxxxx:~$ mysqladmin -u root password
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost''
xxxxxxxx:~$ sudo mysqladmin -u root password
New password:
Confirm new password:
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.
1. Why I can't be able to use "mysqladmin" command without being logged in as root?
2. How to fix the warning for mysqladmin set root password? ANd can I be able to use that password inside mysql workbench in future if decide to use it?
After setting root password(assuming that's the right way to set it) , I have installed mysql-workbench
xxxxxxx:~$ sudo apt-get install mysql-workbench
When I launch mysql workbench, I can't be able to connect to user:root using hostname: localhost and port: 3306 and password set using mysqladmin command.
I also tried to use hostname: 127.0.0.1 but that didn't work either.
3. How to fix mysql-workbench issue?
I looked on internet to find answers for this and tried multiple solutions, but none worked.
Hoping to get cleaner answer here.