![安装了 MySQL 但找不到命令](https://linux22.com/image/937611/%E5%AE%89%E8%A3%85%E4%BA%86%20MySQL%20%E4%BD%86%E6%89%BE%E4%B8%8D%E5%88%B0%E5%91%BD%E4%BB%A4.png)
我刚刚在我的 Ubuntu 笔记本电脑上安装了 MySQL 服务器,但看起来终端中的“mysql”命令无法正常工作。
看起来 MySQL 没有安装在“usr/bin”文件夹中。我该如何将 MySQL 安装在“usr/bin”文件夹中?
我将不胜感激任何帮助。
安装命令:
sudo apt install mysql-server
我尝试过的:
mysql
和
sudo mysql -u root -p
我收到如下错误消息:
Command 'mysql' not found, but can be installed with:
sudo service mysql status 输出:
mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset:>
Active: active (running) since Sat 2021-05-15 20:18:49 EDT; 23min ago
Main PID: 1031 (mysqld)
Status: "Server is operational"
Tasks: 37 (limit: 4485)
Memory: 393.7M
CGroup: /system.slice/mysql.service
└─1031 /usr/sbin/mysqld
whereis mysql 输出:
mysql: /usr/lib/mysql /etc/mysql
which mysql
什么也不做
编辑:
mysql-client 已安装。
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-client-core-8.0 is already the newest version (8.0.25-0ubuntu0.20.04.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.