mysql数据库新安装无法启动
admin
2023-05-01 08:23:57
0

mysql数据库源码编译之后,启动失败具体报错日志如下:

2018-04-13 23:45:46 67547 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
2018-04-13 23:45:46 67547 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2018-04-13 23:45:46 67547 [Note] InnoDB: Using atomics to ref count buffer pool pages
2018-04-13 23:45:46 67547 [Note] InnoDB: The InnoDB memory heap is disabled
2018-04-13 23:45:46 67547 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-04-13 23:45:46 67547 [Note] InnoDB: Memory barrier is not used
2018-04-13 23:45:46 67547 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-04-13 23:45:46 67547 [Note] InnoDB: Using CPU crc32 instructions
2018-04-13 23:45:46 67547 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2018-04-13 23:45:46 67547 [Note] InnoDB: Completed initialization of buffer pool
2018-04-13 23:45:46 67547 [Note] InnoDB: Highest supported file format is Barracuda.
2018-04-13 23:45:46 67547 [Note] InnoDB: Log scan progressed past the checkpoint lsn 49463
2018-04-13 23:45:46 67547 [Note] InnoDB: Database was not shutdown normally!
2018-04-13 23:45:46 67547 [Note] InnoDB: Starting crash recovery.
2018-04-13 23:45:46 67547 [Note] InnoDB: Reading tablespace information from the .ibd files...
2018-04-13 23:45:46 67547 [Note] InnoDB: Restoring possible half-written data pages 
2018-04-13 23:45:46 67547 [Note] InnoDB: from the doublewrite buffer...
InnoDB: Doing recovery: scanned up to log sequence number 1600607
2018-04-13 23:45:46 67547 [Note] InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percent: 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 
InnoDB: Apply batch completed
2018-04-13 23:45:46 67547 [Note] InnoDB: 128 rollback segment(s) are active.
2018-04-13 23:45:46 67547 [Note] InnoDB: Waiting for purge to start
2018-04-13 23:45:46 67547 [Note] InnoDB: 5.6.39 started; log sequence number 1600607
2018-04-13 23:45:46 67547 [Note] Server hostname (bind-address): '*'; port: 3306
2018-04-13 23:45:46 67547 [Note] IPv6 is available.
2018-04-13 23:45:46 67547 [Note]   - '::' resolves to '::';
2018-04-13 23:45:46 67547 [Note] Server socket created on IP: '::'.
2018-04-13 23:45:46 67547 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

解决方法:
重新初始化数据库即可
shell> /usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data`
之后数据库启动成功
shell> /etc/init.d/mysqld start
Starting MySQL. SUCCESS!

设置root用户登陆密码:
shell> mysqladmin -uroot -p password '123456'
Enter password:【默认密码为空直接回车即可】
Warning: Using a password on the command line interface can be insecur

相关内容

热门资讯

美媒又想起这茬:2年前在地中海... 【文/观察者网 阮佳琪】2024年12月23日,载有16名船员的俄罗斯“大熊星座”号货船在西班牙近海...
App过度索取授权或被境外间谍... 微信公众号“国家安全部”5月13日发文: 手机里各种各样的应用程序(APP)五花八门,在方便我们生...
广合科技获得发明专利授权:“一... 证券之星消息,根据天眼查APP数据显示广合科技(001389)新获得一项发明专利授权,专利名为“一种...
华尔街科技老将:大科技公司分化... 5月11日,互联网泡沫时期的知名芯片分析师、Niles Investment Management创...
香港80后“地产女王”烧炭身亡... 据《香港01》报道,5月12日,香港九龙传统豪宅地段加多利山畔的豪宅项目Kadoorie Hill发...
谷歌发布安卓 AI 系统,这就... 和去年一样,在正式的 Google I/O 开发者大会之前,谷歌为 Android 单独开了一次小型...
300斤医生走红 曾一年猛涨1...   300斤医生走红 曾一年猛涨100斤  【300斤医生走红 曾一年猛涨100斤】5月11日,上海...
新乡市主要负责同志职务调整 日前,中共河南省委决定:魏建平同志任中共新乡市委书记,李卫东同志不再担任中共新乡市委书记、常委、委员...
九阳电饭锅H01故障 H01是因为上盖异常高温,有可能是机板不良造成的;同时也可能是故障前没有清洗上盖或溢出米浆等情况造成...
电饭煲显示e3是什么原因 1、可能是电饭煲里面的食物水分烧干之后,密封圈在高温运转的环境下被烧焦了,这个情况下可能会出现故障提...