_Rekent 2017-08-10 08:27 采纳率: 26.3%
浏览 4578

Mysql初始化之后,错误文档里没有随机密码

执行 mysql -initialize之后,启动了mysql服务。
再var/log里找到了mysqld.log,但是里面并没有生成的临时密码,怎么破

[root@Lettiy log]# more mysqld.log
2017-08-10T07:24:57.951732Z 0 [Warning] --bootstrap is deprecated. Please consider using --initialize instead
2017-08-10T07:25:48.096043Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-08-10T07:25:48.098429Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.17) starting as process 27156 ...
2017-08-10T07:25:48.101563Z 0 [Note] InnoDB: PUNCH HOLE support available
2017-08-10T07:25:48.101599Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-08-10T07:25:48.101608Z 0 [Note] InnoDB: Uses event mutexes
2017-08-10T07:25:48.101616Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-08-10T07:25:48.101627Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-08-10T07:25:48.101636Z 0 [Note] InnoDB: Using Linux native AIO
2017-08-10T07:25:48.101934Z 0 [Note] InnoDB: Number of pools: 1
2017-08-10T07:25:48.102049Z 0 [Note] InnoDB: Using CPU crc32 instructions
2017-08-10T07:25:48.103561Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2017-08-10T07:25:48.113043Z 0 [Note] InnoDB: Completed initialization of buffer pool
2017-08-10T07:25:48.125171Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2017-08-10T07:25:48.137118Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2017-08-10T07:25:48.151431Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2017-08-10T07:25:48.151478Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2017-08-10T07:25:48.347595Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2017-08-10T07:25:48.349071Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2017-08-10T07:25:48.349085Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2017-08-10T07:25:48.350196Z 0 [Note] InnoDB: 5.7.17 started; log sequence number 2534561
2017-08-10T07:25:48.350863Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2017-08-10T07:25:48.351759Z 0 [Note] InnoDB: Buffer pool(s) load completed at 170810 15:25:48
2017-08-10T07:25:48.352224Z 0 [Note] Plugin 'FEDERATED' is disabled.
2017-08-10T07:25:48.356787Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2017-08-10T07:25:48.357006Z 0 [Warning] CA certificate ca.pem is self signed.
2017-08-10T07:25:48.378054Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2017-08-10T07:25:48.378123Z 0 [Note] IPv6 is available.
2017-08-10T07:25:48.378136Z 0 [Note] - '::' resolves to '::';
2017-08-10T07:25:48.378160Z 0 [Note] Server socket created on IP: '::'.
2017-08-10T07:25:48.388626Z 0 [Note] Event Scheduler: Loaded 0 events
2017-08-10T07:25:48.389012Z 0 [Note] Executing 'SELECT * FROM INFORMATION_SCHEMA.TABLES;' to get a list of tables using the deprecated partition engine. You may use the startup option '--disab
le-partition-engine-check' to skip this check.
2017-08-10T07:25:48.389024Z 0 [Note] Beginning of list of non-natively partitioned tables
2017-08-10T07:25:48.400722Z 0 [Note] End of list of non-natively partitioned tables
2017-08-10T07:25:48.401022Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.17' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
2017-08-10T07:26:20.614367Z 3 [Note] Access denied for user 'root'@'localhost' (using password: YES)
2017-08-10T07:56:58.334920Z 4 [Note] Access denied for user 'root'@'localhost' (using password: NO)
2017-08-10T07:57:05.644582Z 5 [Note] Access denied for user 'root'@'localhost' (using password: NO)
2017-08-10T07:57:50.783465Z 6 [Note] Access denied for user 'root'@'localhost' (using password: NO)
2017-08-10T08:02:28.660833Z 7 [Note] Access denied for user 'root'@'localhost' (using password: YES)
2017-08-10T08:14:42.559242Z 8 [Note] Access denied for user 'root'@'localhost' (using password: NO)
2017-08-10T08:16:11.932811Z 9 [Note] Access denied for user 'root'@'localhost' (using password: YES)

  • 写回答

4条回答 默认 最新

  • Flying_L 2017-08-10 08:43
    关注

    麻烦提供一下你的mysql版本。不同的版本这个密码是不一样的。
    ①检查var/log/mysqld.log中的密码
    ②检查mysql用户根目录下的.mysql_secret文件,可以使用find / -name "*mysql_secret*"查找这个文件

    另外你是否使用了--initialize-insecure参数安装数据库?如果用的是--initialize-insecure初始化数据库的话,是不会生成随机密码的,初始密码为空登录一下试试。

    评论

报告相同问题?

悬赏问题

  • ¥15 Jenkins+k8s部署slave节点offline
  • ¥15 微信小游戏反编译后,出现找不到分包的情况
  • ¥15 如何实现从tello无人机上获取实时传输的视频流,然后将获取的视频通过yolov5进行检测
  • ¥15 WPF使用Canvas绘制矢量图问题
  • ¥15 用三极管设计一个单管共射放大电路
  • ¥15 孟德尔随机化r语言运行问题
  • ¥15 pyinstaller编译的时候出现No module named 'imp'
  • ¥15 nirs_kit中打码怎么看(打码文件是csv格式)
  • ¥15 怎么把多于硬盘空间放到根目录下
  • ¥15 Matlab问题解答有两个问题