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

相关推荐
2601_951643778 小时前
Python第一,Java跌出前三,C语言杀回来了
java·c语言·python·编程语言排行·技术趋势
AI科技星9 小时前
数术工坊 · 第四卷 橡皮泥江湖(拓扑学)【完整定稿】
c语言·开发语言·汇编·electron·概率论·拓扑学
sevencheng7989 小时前
【ADB】adb命令行常用按键模拟代码
linux·adb·模拟按键,返回键,音量键
AI科技星11 小时前
数术工坊第八卷:算力革命
c语言·开发语言·网络·量子计算·agi
.道阻且长.13 小时前
C++ string 操作指南:接口解析
java·c语言·开发语言·c++
健康平安的活着13 小时前
mysql中数据库脚本太大,通过脚本命令修改db名称
数据库·mysql
2601_9516457813 小时前
如何优雅地使用c语言编写爬虫
c语言·爬虫·网络请求·字符串处理·cspider
6v6-博客14 小时前
C语言字符串中空格的表示方法
c语言·开发语言
SHARK_pssm15 小时前
【数据结构——树与堆】
c语言·数据结构·经验分享·笔记
minji...15 小时前
MySQL数据库 (八) MySQL表的基本查询(下),truncate、group by、聚合函数、分组聚合统计
数据库·mysql·聚合函数·update·分组聚合统计