【问题标题】:Permission denied when starting MySQL Server from MySQL Workbench in Ubuntu在 Ubuntu 中从 MySQL Workbench 启动 MySQL 服务器时权限被拒绝
【发布时间】:2016-06-11 10:43:48
【问题描述】:

我正在使用 Linux Ubuntu 14.04 LTS,我使用 Ubuntu 软件中心 安装了 Mysql Workbench。现在,当我打开连接或单击 Start Server 按钮时,我都无法启动服务器。

服务器配置为在 localhost:3306 上运行(默认配置)。

这是 Mysql Workbench 启动消息日志:

2016-02-28 12:10:27 - Checked server status: Server is stopped.
2016-02-28 12:10:35 - Checked server status: Server is stopped.
2016-02-28 12:10:50 - Starting server...
2016-02-28 12:10:50 - Executting '/etc/init.d/mysqld start'
2016-02-28 12:10:53 - Checked server status: Server is stopped.
2016-02-28 12:10:59 - Could not stop server. Permission denied
2016-02-28 12:10:59 - Checked server status: Server is stopped.

【问题讨论】:

  • 不是 Ubuntu 大师,但普通用户无法启动和停止服务。系统是否提示您输入您的 root 密码或 sudo 您自己?
  • 是的,我被要求输入密码,但我不知道该输入什么,因为我在安装过程中没有提供任何密码。
  • 提示到底是什么意思? (请记住,我们不能从您的肩膀上看您的显示器)。你没有系统的root密码?

标签: mysql linux ubuntu ubuntu-14.04 mysql-workbench


【解决方案1】:

您需要以 root 权限执行此操作,因此您需要能够使用 sudo。执行此操作时,系统会提示您输入 您的 密码。如果不允许,则必须申请 sudo 访问权限。

我认为你的实际问题是你没有安装 mysql 服务器。不太清楚工作台是什么。如果要在服务器上制作数据库和表并存储信息,则需要安装mysql服务器。在命令提示符下:

$ sudo apt-get install mysql-server

安装服务器。然后运行

$ sudo bash
$ service mysql start
or 
$ mysqld_safe

然后看看它是否在运行

$ service mysql status
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2016-02-28 22:31:48 AEDT; 3min 11s ago

显示“Active: ...”的行就是您要查找的内容

【讨论】:

  • MySQL workbench 是一个帮助管理客户端安装不同服务器的软件
  • 问题是关于使用特定的 GUI 工具 (MySQL Workbench) 启动和停止 MySQL 服务器,而您的回答建议使用命令行 :-?
  • 并安装 MySQL 服务器。命令行是在 Ubuntu 上安装、启动和停止服务最可靠、最一致的方式
猜你喜欢
  • 1970-01-01
  • 2011-12-06
  • 2018-01-11
  • 2016-07-31
  • 2021-05-03
  • 2019-05-11
  • 2018-08-04
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多