hxqpython 2019-10-21 14:59 采纳率: 0%
浏览 328

【mysql不能登陆root】

mysql无法登陆root:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

查了一下,删掉data文件夹下和数据库无关的文件,在my-default.ini中加上'skip-grant-tables'选项,跳过密码登陆依然失败,加tmpdir路径也不可以;

PS C:\Program Files\MySQL\MySQL Server 5.6\bin> mysqld --skip-grant-tables
2019-10-21 14:48:07 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-10-21 14:48:07 4416 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.6\data\DESKTOP-FVGQVE8.lower-test
2019-10-21 14:48:07 4416 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.6\data\DESKTOP-FVGQVE8.lower-test
2019-10-21 14:48:07 4416 [Note] Plugin 'FEDERATED' is disabled.
2019-10-21 14:48:07 4416 [Note] InnoDB: The InnoDB memory heap is disabled
2019-10-21 14:48:07 4416 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2019-10-21 14:48:07 4416 [Note] InnoDB: Compressed tables use zlib 1.2.3
2019-10-21 14:48:07 4416 [Note] InnoDB: CPU does not support crc32 instructions
2019-10-21 14:48:07 4416 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2019-10-21 14:48:07 4416 [Note] InnoDB: Completed initialization of buffer pool
2019-10-21 14:48:07 32d4  InnoDB: Operating system error number 5 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory. It may also be you have created a subdirectory
InnoDB: of the same name as a data file.
2019-10-21 14:48:07 32d4  InnoDB: File name .\ibdata1
2019-10-21 14:48:07 32d4  InnoDB: File operation call: 'create' returned OS error 105.
2019-10-21 14:48:07 32d4  InnoDB: Cannot continue operation.

这是配置文件:

[mysqld]

explicit_defaults_for_timestamp=true
tmpdir="C:/Program Files/MySQL Server 5.6/temp/"
skip-grant-tables

old_passwords=0
# 设置3306端口

port=3306

# 设置mysql的安装目录

basedir="C:/Program Files/MySQL/MySQL Server 5.6

"# 设置mysql数据库的数据的存放目录

datadir="C:/Program Files/MySQL/MySQL Server 5.6/data

"# 允许最大连接数

max_connections=200

# 允许连接失败的次数

max_connect_errors=10

# 服务端使用的字符集默认为UTF8

character-set-server=utf8

# 创建新表时将使用的默认存储引擎

default-storage-engine=MYISAM
# 默认使用“mysql_native_password”插件认证

#mysql_native_password
default_authentication_plugin=mysql_native_password
[mysql]
# 设置mysql客户端默认字符集

default-character-set=utf8


# 设置mysql客户端连接服务端时默认使用的端口

port=3306

default-character-set=utf8
innodb_buffer_pool_size=32M


innodb_force_recovery = 1

请大神解答这是什么问题?

  • 写回答

3条回答 默认 最新

  • zea_liu 2019-10-21 15:11
    关注

    你的密码是否正确,感觉是密码不正确

    评论

报告相同问题?

悬赏问题

  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图