前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >MySQL数据库源码编译安装无法启动解决

MySQL数据库源码编译安装无法启动解决

作者头像
星哥玩云
发布2022-08-16 14:43:02
4.7K0
发布2022-08-16 14:43:02
举报
文章被收录于专栏:开源部署

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

2018-04-14 19:39:46 67547 [Note] Plugin 'FEDERATED' is disabled. /usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist 2018-04-14 19:39:46 67547 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. 2018-04-14 19:39:46 67547 [Note] InnoDB: Using atomics to ref count buffer pool pages 2018-04-14 19:39:46 67547 [Note] InnoDB: The InnoDB memory heap is disabled 2018-04-14 19:39:46 67547 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2018-04-14 19:39:46 67547 [Note] InnoDB: Memory barrier is not used 2018-04-14 19:39:46 67547 [Note] InnoDB: Compressed tables use zlib 1.2.3 2018-04-14 19:39:46 67547 [Note] InnoDB: Using CPU crc32 instructions 2018-04-14 19:39:46 67547 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2018-04-14 19:39:46 67547 [Note] InnoDB: Completed initialization of buffer pool 2018-04-14 19:39:46 67547 [Note] InnoDB: Highest supported file format is Barracuda. 2018-04-14 19:39:46 67547 [Note] InnoDB: Log scan progressed past the checkpoint lsn 49463 2018-04-14 19:39:46 67547 [Note] InnoDB: Database was not shutdown normally! 2018-04-14 19:39:46 67547 [Note] InnoDB: Starting crash recovery. 2018-04-14 19:39:46 67547 [Note] InnoDB: Reading tablespace information from the .ibd files... 2018-04-14 19:39:46 67547 [Note] InnoDB: Restoring possible half-written data pages 2018-04-14 19:39:46 67547 [Note] InnoDB: from the doublewrite buffer... InnoDB: Doing recovery: scanned up to log sequence number 1600607 2018-04-14 19:39: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-14 19:39:46 67547 [Note] InnoDB: 128 rollback segment(s) are active. 2018-04-14 19:39:46 67547 [Note] InnoDB: Waiting for purge to start 2018-04-14 19:39:46 67547 [Note] InnoDB: 5.6.39 started; log sequence number 1600607 2018-04-14 19:39:46 67547 [Note] Server hostname (bind-address): '*'; port: 3306 2018-04-14 19:39:46 67547 [Note] IPv6 is available. 2018-04-14 19:39:46 67547 [Note]  - '::' resolves to '::'; 2018-04-14 19:39:46 67547 [Note] Server socket created on IP: '::'. 2018-04-14 19:39: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

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
云数据库 SQL Server
腾讯云数据库 SQL Server (TencentDB for SQL Server)是业界最常用的商用数据库之一,对基于 Windows 架构的应用程序具有完美的支持。TencentDB for SQL Server 拥有微软正版授权,可持续为用户提供最新的功能,避免未授权使用软件的风险。具有即开即用、稳定可靠、安全运行、弹性扩缩等特点。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档