博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
mysql数据库新安装无法启动
阅读量:6564 次
发布时间:2019-06-24

本文共 2834 字,大约阅读时间需要 9 分钟。

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

2018-04-13 23:45:46 67547 [Note] Plugin 'FEDERATED' is disabled./usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist2018-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 pages2018-04-13 23:45:46 67547 [Note] InnoDB: The InnoDB memory heap is disabled2018-04-13 23:45:46 67547 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins2018-04-13 23:45:46 67547 [Note] InnoDB: Memory barrier is not used2018-04-13 23:45:46 67547 [Note] InnoDB: Compressed tables use zlib 1.2.32018-04-13 23:45:46 67547 [Note] InnoDB: Using CPU crc32 instructions2018-04-13 23:45:46 67547 [Note] InnoDB: Initializing buffer pool, size = 128.0M2018-04-13 23:45:46 67547 [Note] InnoDB: Completed initialization of buffer pool2018-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 494632018-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 16006072018-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 completed2018-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 start2018-04-13 23:45:46 67547 [Note] InnoDB: 5.6.39 started; log sequence number 16006072018-04-13 23:45:46 67547 [Note] Server hostname (bind-address): '*'; port: 33062018-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

转载于:https://blog.51cto.com/maoxiaoxiong/2103312

你可能感兴趣的文章
HWND-WindowID-Hinstance
查看>>
自定义标签随笔
查看>>
.NET Core 配置
查看>>
php构造函数实例讲解
查看>>
windows开机自启动的django服务
查看>>
控制台应用程序_笔记
查看>>
TensorFlow学习笔记(五)图像数据处理
查看>>
apache httpd配置ajp报错:ap_proxy_connect_backend disabling worker for (localhost)
查看>>
web项目集成maven时坑爹问题
查看>>
[工具]toolbox_graph_dijkstra算法
查看>>
Workbench热水泵系统
查看>>
Active information gathering-services enumeration
查看>>
第三次过程性考核
查看>>
OOM和JVM配置优化
查看>>
python单元测试unittest、setUp、tearDown()
查看>>
ECMAScript6新特性之继承
查看>>
C# UDP穿越NAT
查看>>
matlab mod()&rem()
查看>>
最大熵模型
查看>>
java中Servlet处理乱码
查看>>