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

相关推荐
misL NITL12 小时前
mysql之如何获知版本
数据库·mysql
代码中介商14 小时前
银行管理系统的业务血肉 —— 流程、状态机、输入校验与持久化(下篇)
c语言·算法
北极的冰箱14 小时前
MySQL Ver 8.0.41 for macos14.7密码遗忘
数据库·mysql
XDH_CS15 小时前
MySQL 8.0 安装与 MySQL Workbench 使用全流程(超详细教程)
开发语言·数据库·mysql
秋915 小时前
MySQL 8.0.46 全平台安装与配置详解(Windows/Linux/macOS)
linux·windows·mysql
AtOR CUES16 小时前
MySQL——表操作及查询
android·mysql·adb
爱编码的小八嘎16 小时前
C语言完美演绎9-12
c语言
mOok ONSC18 小时前
mysql9.0windows安装
windows·adb
Navigator_Z18 小时前
LeetCode //C - 1031. Maximum Sum of Two Non-Overlapping Subarrays
c语言·算法·leetcode
俺不要写代码19 小时前
数据库:DQL
数据库·sql·mysql