• mysql 7.5.8 服务无法启动 服务没有报告任何错误


    你安装的mysql位置不是c盘的话应该出现此问题。

    1.打开bin下的mysql_config.pl文件,查找以下几行,把目录改成你安装mysql的目录即可。

    my $ldata   = 'C:/Program Files/MySQL/MySQL Server 5.7/data';
    my $execdir = 'C:/Program Files/MySQL/bin';
    my $bindir  = 'C:/Program Files/MySQL/bin';
    
    my $pkglibdir = fix_path('C:/Program Files/MySQL/lib',"libmysql/relwithdebinfo",
                             "libmysql/release","libmysql/debug","lib/mysql","lib");
    
    my $pkgincludedir = fix_path('C:/Program Files/MySQL/include', "include/mysql", "include");

    我是安装在D盘所以改成了如一下几行:

    my $ldata   = 'D:/Program Files/MySQL/MySQL Server 5.7/data';
    my $execdir = 'D:/Program Files/MySQL/bin';
    my $bindir  = 'D:/Program Files/MySQL/bin';
    
    my $pkglibdir = fix_path('D:/Program Files/MySQL/lib',"libmysql/relwithdebinfo",
                             "libmysql/release","libmysql/debug","lib/mysql","lib");
    
    my $pkgincludedir = fix_path('D:/Program Files/MySQL/include', "include/mysql", "include");

    2.以管理员身份运行cmd,输入:mysqld -install(如果不用管理员身份运行,将会因为权限不够而出现错误:Install/Remove of the Service Denied!)

    3.运行mysqld  --initialize(标题问题所在,若没有init则不存在data目录,自然无法启动成功)

    4.安装成功后就要启动服务了,继续在cmd中输入:net start mysql,服务启动成功!

    5.服务启动成功之后,就可以登录了

    在mysql目录下搜索*.err,以文本形式打开才能看到如下内容:

    016-02-25T15:09:43.033062Z 1 [Note] A temporary password is generated for root@localhost: >mso<k70mrWe

    红色字母即为第一次的登陆密码,记得加双引号。

    输入mysql -u root -p回撤输入密码即可登录

    6.修改密码

    格式:mysql> set password for 用户名@localhost = password('新密码');

  • 相关阅读:
    JS 里的数据类型转换
    mysql-5.7.25解压版本安装和navicat 12.1版本破解-4.8破解工具
    idea如何打包项目(java)
    idea如何使用git
    staruml百度网盘下载
    IDEA如何添加库lib(java)
    Win10下JDK环境搭建的两种方法
    HashMap的四种遍历!
    (转)排序算法之插入排序
    (转)排序算法之快速排序
  • 原文地址:https://www.cnblogs.com/nuomin/p/8179394.html
Copyright © 2020-2023  润新知