当前位置:网站首页>搭建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
边栏推荐
- Tips in MATLAB
- PDH optical transceiver 4-way E1 + 4-way 100M Ethernet 4-way 2m optical transceiver FC single fiber 20km rack type
- Ningde's position in the times is not guaranteed?
- The whole network is the most complete. How to do interface automation test? Proficient in interface automation test details
- The most detailed in the whole network, software testing measurement, how to optimize software testing cost and improve efficiency --- hot
- Two methods are used to solve the "maximum palindrome product" problem
- C syntax pattern matching [switch expression]
- Creating wechat voucher process with PHP
- Small companies don't make formal offers
- Using stack to solve the problem of "mini parser"
猜你喜欢

Guangcheng cloud service can fill in a daily report regularly every day

微软是如何解决 PC 端程序多开问题的
![[format] simple output (2)](/img/24/64739f5e6bbd54bfa9fb78b8c53c94.png)
[format] simple output (2)

Source code interpretation of Flink index parameters (read quantity, sent quantity, sent bytes, received bytes, etc.)

Array and collection types passed by openfeign parameters

Laravel8- use JWT

C# WPF UI框架MahApps切换主题

Recursion - outputs continuously increasing numbers

Source generator actual combat

tf. keras. layers. Embedding function
随机推荐
Detailed log display of openfeign call
HLS / chisel uses CORDIC hyperbolic system to realize square root calculation
It turns out that PID was born in the struggle between Lao wangtou and Lao sky
Systemctl start Prometheus + grafana environment
C syntax pattern matching [switch expression]
SQL statement - DDL
MYSQL05_ Ordr by sorting, limit grouping, group by grouping
使用两种方法来解决“最大回文数乘积”问题
tf. keras. layers. Embedding function
Guangcheng cloud service can fill in a daily report regularly every day
Source generator actual combat
ASP.NET 6 中间件系列 - 条件中间件
建立与遍历二叉树
7-11 rearrange the linked list (25 points)
be based on. NETCORE development blog project starblog - (1) why do you need to write your own blog?
利用栈的回溯来解决“文件的最长绝对路径”问题
AOT和单文件发布对程序性能的影响
7-11 重排链表 (25 分)
Opencv fills the rectangle with a transparent color
Tencent video VIP member, weekly card special price of 9 yuan! Tencent official direct charging, members take effect immediately!