重装系统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>

相关推荐
沐晓时光6 小时前
C语言入门,深入理解指针(3)
c语言·开发语言
SuperByteMaster7 小时前
wfi进入之前没有清除basepri, 导致中断优先级不够,wfi 退不出来
c语言
程序员Sunday8 小时前
MySQL 为什么使用 B+ 树索引?把范围查询、回表和覆盖索引连起来
数据库·mysql
Navigator_Z8 小时前
LeetCode //C - 1286. Iterator for Combination
c语言·算法·leetcode
Yyyyyy~8 小时前
[ Mysql ] 库的操作
mysql
小米里的大麦9 小时前
16 MySQL 事务
数据库·mysql
Titan20249 小时前
MySQL访问个人学习笔记
笔记·学习·mysql
for_ever_love__10 小时前
MySQL 全文索引实战:FULLTEXT、ngram 中文分词与 MATCH AGAINST 到底该怎么用
java·python·mysql·全文检索·分词·索引·ngram
奋斗的阿狸_198611 小时前
ESP32-S3 + ES7210 四通道麦克风录音上传方案
c语言·开发语言·fpga开发
2401_8628808211 小时前
iMX6ULL 驱动工程搭建 + LED 灯驱动
c语言·驱动开发·嵌入式硬件