MySQL Workbench - 连接到本地主机

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20431491/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 19:37:41  来源:igfitidea点击:

MySQL Workbench - Connect to a Localhost

mysqlmysql-workbench

提问by scapegoat17

I just installed MySQL Workbench and there are no connections available for my localhost server. When I try to make one, I get an error popup. Has anyone experienced something like this before and would be able to help me out?

我刚刚安装了 MySQL Workbench,我的本地主机服务器没有可用的连接。当我尝试制作一个时,我收到一个错误弹出窗口。有没有人以前经历过这样的事情并且能够帮助我?

Here is what it looks like on start up:

这是启动时的样子:

MySQL home page

MySQL主页

And if I try to make a connection myself it shows this: enter image description here

如果我尝试自己建立连接,它会显示: 在此处输入图片说明

Any help would be much appreciated - thanks!

任何帮助将不胜感激 - 谢谢!

回答by James Smith

Sounds like you only installed the MySQL Client Tools (MySQL Workbench). You have to install the MySQL Database server, configure and start it.

听起来您只安装了 MySQL 客户端工具 (MySQL Workbench)。您必须安装 MySQL 数据库服务器,配置并启动它。

http://dev.mysql.com/downloads/

http://dev.mysql.com/downloads/

You probably want the MySQL Community Server download.

您可能想要下载 MySQL 社区服务器。

回答by Dharmendra Prajapati

Its Worked for me on Windows

它在 Windows 上对我有用

First i installed and started XAMPP Control Panelenter image description here

首先我安装并启动了XAMPP 控制面板在此处输入图片说明

Clicked for Start under Actions for MySQL. And below is my Configuration for MySQL (MySQL Workbench 8.0 CE) Connections enter image description hereAnd it got connected with Test DataBase

单击“MySQL 操作”下的“开始”。下面是我的 MySQL (MySQL Workbench 8.0 CE) 连接配置 在此处输入图片说明,它与测试数据库连接

回答by UMAIR ALI

If xamp already installed on your computer user these settings

如果您的计算机上已经安装了 xamp 用户这些设置

enter image description here

在此处输入图片说明

回答by user4825230

I had this problem and I just realized that if in the server you see the user in the menu SERVER -> USERS AND PRIVILEGES and find the user who has % as HOSTNAME, you can use it instead the root user.

我遇到了这个问题,我刚刚意识到,如果在服务器中您在菜单 SERVER -> USERS AND PRIVILEGES 中看到用户并找到将 % 作为 HOSTNAME 的用户,您可以使用它代替 root 用户。

That's all

就这样

回答by ContexDev

if you are using localhost database, try port 3306

如果您使用的是 localhost 数据库,请尝试使用端口 3306