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.
Note: Installed mysql workbench version 6.3 and mysql server version 5.7
Before installing I cleaned any mysql files/references I had on my linux machine.
Below steps worked fine for me -
Go to the download page for the MySQL APT repository at https://dev.mysql.com/downloads/repo/apt/ and downloaded mysql-apt-config_0.8.10-1_all.deb
Made sure everything is up to date.
during this step chose mysql server version 5.7
during this step, I was prompted to to set root password. Ended up setting root password as 'pa$$word'
If you are not prompted to set root password then you can follow following commands once above command is completed. sudo mysql
Launched mysql workbench from start menu on linux mint 19. Here Server connection has parameteres like hostname: 127.0.0.1 , port:3306, Username: root, password: pa$$word. The tested connection - successful.
double clicked connection and it launched instance fine.