当前位置:网站首页>搭建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
边栏推荐
- JS relearning
- C# 读写二进制文件
- 基于.NetCore开发博客项目 StarBlog - (2) 环境准备和创建项目
- 全网讲的最细,软件测试度量,怎样优化软件测试成本提高效率---火爆
- Onenet connection process
- tf. keras. layers. Inputlayer function
- Thoughts on the 2022 national network security competition of the national secondary vocational group (only one idea for myself) - network security competition questions (10)
- MYSQL03_ SQL overview, rules and specifications, basic select statements, display table structure
- REINFORCE
- 由于3²+4²=5²,所以称‘3,4,5‘为勾股数,求n(包括n)以内所有勾股数数组。
猜你喜欢
LNMP MySQL allows remote access
MYSQL03_ SQL overview, rules and specifications, basic select statements, display table structure
Laravel new route file
TP5 email (2020-05-27)
全网最全,接口自动化测试怎么做的?精通接口自动化测试详解
在.NE6 WebApi中使用分布式缓存Redis
Introduction to ACM [TSP problem]
tf. keras. layers. Density function
Tips in MATLAB
Vs code setting line feed
随机推荐
Realize QQ login with PHP
How does Microsoft solve the problem of multiple PC programs
TP5 inherits base and uses the variables in base
Summary of interface automation interview questions for software testing
Vs code setting line feed
Openfeign details show
Tencent video price rise: earn more than 7.4 billion a year! Pay attention to me to receive Tencent VIP members, and the weekly card is as low as 7 yuan
ASP.NET 6 中间件系列 - 执行顺序
腾讯视频VIP会员,周卡特价9元!腾讯官方直充,会员立即生效!
使用两种方法来解决“最大回文数乘积”问题
樹莓派開發筆記(十二):入手研華ADVANTECH工控樹莓派UNO-220套件(一):介紹和運行系統
Use of MySQL command line client and common commands
Detailed explanation of distributed things
微软是如何解决 PC 端程序多开问题的——内部实现
C# 读写二进制文件
Middle and rear binary tree
Onenet connection process
Array and collection types passed by openfeign parameters
Miniapi of. Net7 (special section): NET7 Preview3
C read / write binary file