【发布时间】:2019-03-06 03:41:45
【问题描述】:
我尝试在我的笔记本电脑上安装以下操作系统
Mint version 19,
Code name : Tara,
PackageBase : Ubuntu Bionic
Cinnamon (64-bit)
我已经使用以下命令安装了 mysql-server:
xxxxxxx:~$ sudo apt-get install mysql-server
在此安装过程中,我没有被提示输入任何 root 密码。 要查看安装是否成功,我运行了以下命令:
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.
由于没有提示我设置任何root密码,我想到了设置root密码。
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.为什么不以root身份登录就不能使用“mysqladmin”命令?
2.如何修复mysqladmin设置root密码的警告?如果以后决定使用该密码,我可以在 mysql 工作台中使用它吗?
设置root密码后(假设设置正确),我已经安装了mysql-workbench
xxxxxxx:~$ sudo apt-get install mysql-workbench
当我启动 mysql 工作台时,我无法连接到 用户:root 使用主机名:localhost 和端口:3306 并使用 mysqladmin 命令设置密码。
我也尝试使用主机名:127.0.0.1,但这也没有用。
3.如何修复 mysql-workbench 问题?
我在互联网上寻找答案并尝试了多种解决方案,但都没有奏效。
希望在这里得到更清晰的答案。
【问题讨论】:
标签: mysql mysql-workbench linux-mint mysqladmin