MySQL 如何使用mysql创建本地主机数据库?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20544312/
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:39:40  来源:igfitidea点击:

How to create localhost database using mysql?

mysqldatabasewindowsmysql-workbench

提问by alansiqueira27

I download mysql installer here:

我在这里下载 mysql 安装程序:

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

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

And then I downloaded MySql WorkBench.

然后我下载了 MySql WorkBench。

At workbench's connection configuration I put hostname as "127.0.0.1", port "3306", user: "root", password is empty. I click "test connection" and it gives me this error:

在工作台的连接配置中,我将主机名设置为“127.0.0.1”,端口“3306”,用户:“root”,密码为空。我点击“测试连接”,它给了我这个错误:

"Can't connect to MySQL server on '127.0.0.1' (10061)"

“无法连接到 '127.0.0.1' (10061) 上的 MySQL 服务器”

What am I missing?

我错过了什么?

采纳答案by sfotiadis

See herefor starting the service and herefor how to make it permanent. In short to test it, open a "DOS" terminal with administrator privileges and write:

请参阅此处以启动服务,并在此处了解如何使其永久化。总之要测试它,打开一个具有管理员权限的“DOS”终端并写入:

shell> "C:\Program Files\MySQL\[YOUR MYSQL VERSION PATH]\bin\mysqld"

回答by Philip Olson

Consider using the MySQL Installer for Windowsas it installs and updates the various MySQL products on your system, including MySQL Server, MySQL Workbench, and MySQL Notifier. The Notifier monitors your MySQL instances so you'll know if MySQL is running, and it can also be used to start/stop MySQL.

考虑使用适用于 WindowsMySQL 安装程序,因为它会在您的系统上安装和更新各种 MySQL 产品,包括 MySQL Server、MySQL Workbench 和 MySQL Notifier。Notifier 监控您的 MySQL 实例,以便您知道 MySQL 是否正在运行,它还可用于启动/停止 MySQL。

回答by user3002483

removing temp files, and did you restart the computer or stop the MySQL service? That's the error message you get when there isn't a MySQL server running.

删除临时文件,您是否重新启动计算机或停止 MySQL 服务?这是当没有运行 MySQL 服务器时您得到的错误消息。