日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

登录mysql时 未找到 grant命令_我在mysql数据库中可以登陆,为什么用grant命令创建用户时提示错误?...

發布時間:2023/12/10 数据库 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 登录mysql时 未找到 grant命令_我在mysql数据库中可以登陆,为什么用grant命令创建用户时提示错误?... 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

問題表象:

我的mysql中的 my.ini文件配置:

[csharp] view plaincopyprint?

#Path to installation directory. All paths are usually resolved relative to this.

basedir="D:/software_builder/mysql/"

#Path to the database root

datadir="C:/ProgramData/MySQL/MySQL Server 5.5/Data/"

#Path to installation directory. All paths are usually resolved relative to this.

basedir="D:/software_builder/mysql/"

#Path to the database root

datadir="C:/ProgramData/MySQL/MySQL Server 5.5/Data/"

我在 datadir的路徑下找到.err文件,查看錯誤原因

[html] view plaincopyprint?

121022 15:21:06 [Note] Plugin 'FEDERATED' is disabled.

D:\software_builder\mysql\bin\mysqld: Table 'mysql.plugin' doesn't exist

121022 15:21:06 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.

121022 15:21:06 InnoDB: The InnoDB memory heap is disabled

121022 15:21:06 InnoDB: Mutexes and rw_locks use Windows interlocked functions

121022 15:21:06 InnoDB: Compressed tables use zlib 1.2.3

121022 15:21:06 InnoDB: Initializing buffer pool, size = 500.0M

121022 15:21:06 InnoDB: Completed initialization of buffer pool

121022 15:21:06 InnoDB: Log file .\ib_logfile0 did not exist: new to be created

InnoDB: Setting log file .\ib_logfile0 size to 100 MB

InnoDB: Database physically writes the file full: wait...

InnoDB: Progress in MB: 100

121022 15:21:07 InnoDB: Log file .\ib_logfile1 did not exist: new to be created

InnoDB: Setting log file .\ib_logfile1 size to 100 MB

InnoDB: Database physically writes the file full: wait...

InnoDB: Progress in MB: 100

121022 15:21:10 InnoDB: highest supported file format is Barracuda.

InnoDB: The log sequence number in ibdata files does not match

InnoDB: the log sequence number in the ib_logfiles!

121022 15:21:10 InnoDB: Database was not shut down normally!

InnoDB: Starting crash recovery.

InnoDB: Reading tablespace information from the .ibd files...

InnoDB: Restoring possible half-written data pages from the doublewrite

InnoDB: buffer...

121022 15:21:10 InnoDB: Waiting for the background threads to start

121022 15:21:11 InnoDB: 1.1.8 started; log sequence number 3700748

121022 15:21:11 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

121022 15:21:06 [Note] Plugin 'FEDERATED' is disabled.

D:\software_builder\mysql\bin\mysqld: Table 'mysql.plugin' doesn't exist

121022 15:21:06 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.

121022 15:21:06 InnoDB: The InnoDB memory heap is disabled

121022 15:21:06 InnoDB: Mutexes and rw_locks use Windows interlocked functions

121022 15:21:06 InnoDB: Compressed tables use zlib 1.2.3

121022 15:21:06 InnoDB: Initializing buffer pool, size = 500.0M

121022 15:21:06 InnoDB: Completed initialization of buffer pool

121022 15:21:06 InnoDB: Log file .\ib_logfile0 did not exist: new to be created

InnoDB: Setting log file .\ib_logfile0 size to 100 MB

InnoDB: Database physically writes the file full: wait...

InnoDB: Progress in MB: 100

121022 15:21:07 InnoDB: Log file .\ib_logfile1 did not exist: new to be created

InnoDB: Setting log file .\ib_logfile1 size to 100 MB

InnoDB: Database physically writes the file full: wait...

InnoDB: Progress in MB: 100

121022 15:21:10 InnoDB: highest supported file format is Barracuda.

InnoDB: The log sequence number in ibdata files does not match

InnoDB: the log sequence number in the ib_logfiles!

121022 15:21:10 InnoDB: Database was not shut down normally!

InnoDB: Starting crash recovery.

InnoDB: Reading tablespace information from the .ibd files...

InnoDB: Restoring possible half-written data pages from the doublewrite

InnoDB: buffer...

121022 15:21:10 InnoDB: Waiting for the background threads to start

121022 15:21:11 InnoDB: 1.1.8 started; log sequence number 3700748

121022 15:21:11 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

嘗試過無數種網絡搜索的解決方法,有過重裝mysql的念頭,也有過砸電腦的沖動,但最后還是天不負有心人,終于找到了解決方法;

第一步:在mysql的安裝目錄下 basedir="D:/software_builder/mysql/的data文件夾里“D:\software_builder\mysql\data”" 下面還有一個mysql的文件夾(如圖),

把“mysql文件夾”拷貝到數據庫的數據存放位置的data文件夾下(我的是:C:\ProgramData\MySQL\MySQL Server 5.5\data)

然后在服務里面啟動mysql服務,結果:“I get it !”

總結

以上是生活随笔為你收集整理的登录mysql时 未找到 grant命令_我在mysql数据库中可以登陆,为什么用grant命令创建用户时提示错误?...的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。