centos安装mysql5.7
2015-12-07 01:00
519 查看
安装很容易的
yum install mysql-community-server service mysqld restart登陆的时候就坑了,以前都是没有密码的,结果就出事了
[root@c02 ~]# mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)结果是因为mysql为了安全设置了个随机密码,要手动查看
[root@c02 ~]# grep "password" /var/log/mysqld.log 2015-12-06T16:08:10.547239Z 1 [Note] A temporary password is generated for root@localhost: uGKNd<I04+?k对这个uGKNd<I04+?k就是密码,用这个密码登陆,果然就成功了
[root@c02 ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 9 Server version: 5.7.9 Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> exit Bye [root@c02 ~]#
相关文章推荐
- Linux下Python3.4.3安装
- 在Ubuntu中删除旧的内核linux kernel
- 在Ubuntu中安装或升级内核 linux kernel
- linux中的trap命令 | set
- Linux操作系统定时任务系统 Cron 入门
- 如何给Linux (Fedora Ubuntu等)安装字体
- linux下一些实用服务器的搭建
- linux下驱动自动对焦学习总结
- 第二十四天-linux系统磁盘管理知识进阶
- linux sysctl.conf中相关重要设定的详细说明
- v8插件编译使用
- 最近学习linux-c的编程
- Linux ->> uname命令 -- 查看当前系统信息
- Android 5.x 6.x system.new.dat解包工具及方法[Windows\Linux]
- linux中的日志服务syslogd|klogd学习
- 在win10+Linux Ubuntu双系统下安装win xp三系统的痛苦经历
- 【Unix/Linux编程实践】文件系统:编写pwd
- linux中ctrl+z和ctrl+c的区别
- Analysis of Linux kernel crashes
- 【Linux编程】IO复用之poll详解