如何在 XAMPP for Windows 上激活 MySQL 数据库

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

How to Activate MySQL Database on XAMPP for Windows

mysqlwindowsphpmyadminxampp

提问by Celia Fransisca

I can't access phpMyAdminon XAMPP for Windowsand the problem must be with MySQL, because on the XAMPP Status, it says MySQL databaseis DEACTIVATED. But on my XAMPP Control Panel Application, I've already started MySQLand it says Running, although I didn't check the Svctick box (Is that necessary?). How to activate MySQL database so that I can run phpMyAdmin?

我无法在XAMPP for Windows上访问phpMyAdmin并且问题一定出在MySQL 上,因为在XAMPP Status 上,它说MySQL 数据库DEACTIVATED。但是在我的XAMPP 控制面板应用程序上,我已经启动了MySQL并且它显示Running,尽管我没有选中Svc复选框(这有必要吗?)。如何激活 MySQL 数据库以便我可以运行 phpMyAdmin?

Also, when I open phpMyAdminpage, it says :

另外,当我打开phpMyAdmin页面时,它说:

*Error

*错误

MySQL said: Documentation

MySQL 说: 文档

2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

2002 - 服务器没有响应(或者本地 MySQL 服务器的套接字没有正确配置)

Connection for controluser as defined in your configuration failed.*

配置中定义的 controluser 连接失败。*

I've already done a research for an answer to this question, but none of them works for me.

我已经对这个问题的答案进行了研究,但没有一个对我有用。

回答by Hidden

XAMPP only summarys MySQL (Database Server) & Apache (Webserver) in one setup and u can manage them with the xampp starter.

XAMPP 仅在一个设置中汇总 MySQL(数据库服务器)和 Apache(Web 服务器),您可以使用 xampp starter 管理它们。

Aftet the successfully installation navigate to your xampp folder and execute the xampp-control.exe

安装成功后导航到您的 xampp 文件夹并执行 xampp-control.exe

Press the start Button at the mysql line.

在 mysql 行按下开始按钮。

enter image description here

在此处输入图片说明

Now u started successfully mysql. Now there are 2 different ways to administrate your mysql server and his databases.

现在你成功启动了mysql。现在有两种不同的方法来管理您的 mysql 服务器及其数据库。

But at first u have to set/change the MySQL Root password. Start the Apache server and open at your browser localhostor 127.0.0.1. If you didn't deleted anything from the htdocs folder the xampp status page appears. Navigate to security settings and change your mysql root password.

但首先你必须设置/更改 MySQL Root 密码。启动 Apache 服务器并在浏览器localhost127.0.0.1. 如果您没有从 htdocs 文件夹中删除任何内容,则会出现 xampp 状态页面。导航到安全设置并更改您的 mysql 根密码。

Now after this, you can browse to your phpmyadmin under localhost or download a windows mysql client for example navicat lite or mysql workbench. Install it and log to your mysql server with your new root password.

现在,您可以在 localhost 下浏览到您的 phpmyadmin 或下载 Windows mysql 客户端,例如 navicat lite 或 mysql workbench。安装它并使用您的新 root 密码登录到您的 mysql 服务器。

enter image description here

在此处输入图片说明