当前位置:网站首页>搭建XAMPP时mysql端口被占用
搭建XAMPP时mysql端口被占用
2022-04-23 03:06:00 【菜鸟晓晓晓晓飞飞飞飞】
问题描述:搭建xampp提示mysql端口被占用。如下图

原因:电脑之前安装过一个mysql没卸载。
解决办法:
2种情况:1.以前未安装过mysql,直接改端口号即可。
2.以前安装过mysql且不准备删除旧的mysql,但是改用新的mysql:改注册表
针对第一种情况:以前未安装过mysql
按照如下步骤,在xampp更改mysql的配置文件,端口号改为:3308或者任意未被占用端口
a.点击congif==》选择my.ini

b.更改下图中2个端口号为3308,或者其他未被占用端口

针对第二种情况:以前安装过mysql不想卸载,还想使用现在的mysql。
步骤:更改注册表中默认的mysql地址。
原理:把注册表默认的启动地址从旧的mysql改为新的mysql,这样启动mysql的时候,就是启动的新的mysql。
旧的地址:C:\Program Files\MySQL\MySQL Server 5.5\my.ini
xampp新的地址:C:\xampp\mysql\bin\mysqld
1.打开注册表编辑器

2.找到mysql地址HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MySQL

3.双击打开,更改地址,defaults-file=‘这里删掉旧地址,改为新地址’。我都xampp的mysql新的地址是C:\xampp\mysql\bin\mysqld,所以如下图。

结果:xampp可以正常启动啦。

版权声明
本文为[菜鸟晓晓晓晓飞飞飞飞]所创,转载请带上原文链接,感谢
https://blog.csdn.net/dizhujiade/article/details/124303787
边栏推荐
- C# 11 对 ref 和 struct 的改进
- Redis Cluster集群,主节点故障,主从切换后ip变化,客户端需要处理不
- TP5 multi conditional where query (using PHP variables)
- 樹莓派開發筆記(十二):入手研華ADVANTECH工控樹莓派UNO-220套件(一):介紹和運行系統
- ASP. Net and ASP NETCORE multi environment configuration comparison
- If the deep replication of objects is realized through C #?
- Simple example of using redis in PHP
- Binary tree
- Xamarin效果第二十二篇之录音效果
- C#语法糖空合并运算符【??】和空合并赋值运算符【 ??=】
猜你喜欢

LNMP MySQL allows remote access

Er and eer models

Laravel new route file

Plug in for vscode

Summary of software test interview questions

Golden nine silver ten interview season, you are welcome to take away the interview questions (with detailed answer analysis)

Judge whether there is a leap year in the given year

Opencv combines multiple pictures into video

最通俗易懂的依赖注入之服务容器与作用域

TP5 customization in extend directory succeeded and failed. Return information
随机推荐
The most detailed in the whole network, software testing measurement, how to optimize software testing cost and improve efficiency --- hot
Redis Cluster集群,主节点故障,主从切换后ip变化,客户端需要处理不
Array and collection types passed by openfeign parameters
C syntax sugar empty merge operator [?] And null merge assignment operator [? =]
Blazor University (11)组件 — 替换子组件的属性
FileNotFoundError: [Errno 2] No such file or directory
Detailed explanation of distributed things
Er and eer models
The backtracking of stack is used to solve the problem of "the longest absolute path of file"
The space between the left and right of the movie ticket seats is empty and cannot be selected
Detailed log display of openfeign call
ASP.NET和ASP.NETCore多环境配置对比
Two methods are used to solve the "maximum palindrome product" problem
Tips in MATLAB
中后二叉建树
Ningde's position in the times is not guaranteed?
C# WPF UI框架MahApps切换主题
BLDC double closed loop (speed PI + current PI) Simulink simulation model
宁德时代地位不保?
Niuke white moon race 5 [problem solving mathematics field]