重装系统C盘格式化,MYSQL恢复

背景:mysql在E盘,但是C盘重装系统,以前的注册表之类的都没有了,想重新恢复mysql的使用。

  1. 配置以前的环境变量

  2. 按照下面的步骤注册并启动服务

    C:\Users\Administrator>net stop mysql
    没有启动 mysql 服务。

    请键入 NET HELPMSG 3521 以获得更多的帮助。

    C:\Users\Administrator>sc delete mysql
    [SC] DeleteService 成功

    C:\Users\Administrator>E:

    E:>cd /d "E:\Mysql\mysql-5.7.37-winx64\bin"

    E:\MySQL\mysql-5.7.37-winx64\bin>mysqld --install mysql --defaults-file="E:\Mysql\mysql-5.7.37-winx64\my.ini"
    Service successfully installed.

    E:\MySQL\mysql-5.7.37-winx64\bin>net start mysql
    mysql 服务正在启动 .
    mysql 服务已经启动成功。

    E:\MySQL\mysql-5.7.37-winx64\bin>mysql -u root -p
    Enter password: *******
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 2
    Server version: 5.7.37 MySQL Community Server (GPL)

    Copyright (c) 2000, 2022, Oracle and/or its affiliates.

    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    mysql>

相关推荐
luj_176819 分钟前
心形曲线轨迹控制三大关键技术
c语言·开发语言·c++·经验分享·算法
TPBoreas2 小时前
MySQL性能优化面试全攻略
mysql·面试·性能优化
xlq223222 小时前
11.表的内外连接,索引
mysql
AllData公司负责人3 小时前
数据库同步平台|AIIData数据中台实现OceanBase、达梦数据库、OpenGauss、人大金仓、Hive、TDengine 一键接入Doris
大数据·数据库·hive·mysql·oceanbase·tdengine
wefg13 小时前
【MySQL】事务
数据库·mysql
黑白极客4 小时前
mysql的高可用性
数据库·mysql
jimy14 小时前
C语言模拟对象、方法:“函数指针+结构体“复用函数指针指向的函数体
c语言·开发语言
三品吉他手会点灯5 小时前
嵌入式机器学习 - 学习笔记1.1.1 - 什么是机器学习?
c语言·人工智能·笔记·嵌入式硬件·学习·机器学习
小樱花的樱花6 小时前
Linux 线程的创建
linux·c语言·开发语言
heimeiyingwang6 小时前
【架构实战】MySQL索引优化:从慢查询到毫秒响应
数据库·mysql·架构