CentOS5.5+MySQL5.6.33
来源:互联网 发布:新手怎么面试美工工作 编辑:程序博客网 时间:2024/06/06 01:45
下载MySQL-server-5.6.33-1.rhel5.x86_64.rpm与MySQL-client-5.6.33-1.rhel5.x86_64.rpm
http://dev.mysql.com/downloads/file/?id=464994
http://dev.mysql.com/downloads/file/?id=465025
在/usr/local/src/下创建mysql目录
[root@localhost src]# mkdir mysql
将两个rpm文件拷贝到mysql目录下,进行安装:
[root@localhost mysql]# rpm -ivh MySQL-server-5.6.33-1.rhel5.x86_64.rpm
[root@localhost mysql]# rpm -ivh MySQL-client-5.6.33-1.rhel5.x86_64.rpm
安装后,启动mysql
[root@localhost mysql]# /etc/init.d/mysql start
Starting MySQL. [ OK ]
成功启动
使用root登录mysql
[root@localhostbin]# mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password:NO)
查看/root/.mysql_secret文件,找到临时密码
[root@localhostbin]# cat /root/.mysql_secret
# The random password set for the root user at Mon Oct 10 18:25:50 2016 (localtime): Li9uM0_VvslGmjt8
#The random password set for the root user at Mon Oct 10 18:53:29 2016 (localtime): EQnYTpOworiyqYm6
[root@localhostbin]# mysql -u root -p EQnYTpOworiyqYm6##临时密码
Enterpassword:EQnYTpOworiyqYm6##临时密码
提示密码过期
处理方法:
打开/root/.mysql_secret文件,添加一个随机密码:Abcd1234
[root@localhostbin]# sudo cat /root/.mysql_secret
# The random password set for the root user at Mon Oct 10 18:25:50 2016 (localtime): Li9uM0_VvslGmjt8
#The random password set for the root user at Mon Oct 10 18:53:29 2016 (localtime): EQnYTpOworiyqYm6
Abcd1234
[root@localhost bin]# mysql -uroot -p Abcd1234
Enter password:
ERROR 1049 (42000): Unknown database 'Abcd1234'
提示Abcd1234数据库不存在,果断将'Abcd1234'修改为'mysql',保存退出
进行下列操作,修改root用户的密码
1.停止服务
[root@localhostbin]# /etc/init.d/mysql stop
Shuttingdown MySQL.. [ OK ]
2.进入mysqld_safe
[root@localhostbin]# mysqld_safe --skip-grant-tables & ##屏幕打印下列信息
[1] 32329
[root@localhost bin]# 161010 19:47:50 mysqld_safe Logging to'/var/lib/mysql/localhost.localdomain.err'.
161010 19:47:50 mysqld_safe Starting mysqld daemon with databases from/var/lib/mysql
//在此光标处输入如下命令:
mysql--user root mysql
//屏幕打印如下信息:
Readingtable information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcometo the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.33 MySQL Community Server (GPL)
Copyright(c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracleis 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>##证明成功登录
3.修改root用户的密码
mysql>SELECT* FROM user; ##之后更新root用户的密码
mysql>updateuser SET Password = PASSWORD('root') WHERE User = 'root';
mysql>flushprivileges;
mysql>exit;
4.再次使用root登录,密码root
[root@localhostbin]# mysql -u root -p
Enterpassword:
Welcometo the MySQL monitor. Commands end with; or \g.
YourMySQL connection id is 8
Serverversion: 5.6.33 MySQL Community Server (GPL)
Copyright(c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracleis 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> ##登录成功
- CentOS5.5+MySQL5.6.33
- centos5 yum 安装mysql5.5
- CentOS5.5下源码安装mysql5.5
- centos5.5安装nginx0.8.54,mysql5.5.8,php5.3.4
- 通过yum在CentOS5.5上安装MySQL5.1
- centos5.5+nginx0.9.5+mysql5.5.9+php5.2.13 安装笔记
- 通过yum在CentOS5.5上安装MySQL5.1
- CentOS5.4 64/32位系统 ---源码安装mysql5.5
- CentOs5.5+Apache2.2.17+MySQL5.5.8+PHP5.3.5环境搭建
- Linux CentOS5.5 下 mysql5.5.3-m3 同步与主从备份
- CentOS5.5下rpm安装及卸载MySQL5.5.28过程及总结
- 搭建Linux(centos5.5)+Apache2+Mysql5+Php5+zabbix1.8.5系统环境实现网络状况监控
- centos5装php5+apache2.2+mysql5.1
- CentOS5用Yum安装MySQL5.0
- centos5.10下源码编译mysql5.1.73
- CentOS5.8编译安装MySQL5.6.10
- CentOS5.5
- VirtualBox中配置CentOS5.3+Apache+MySql5+php5
- linux下安装mysql
- 开发中的小知识点汇总(持续更新)
- 常见的手机端头部banner切换代码设置
- Twitt map 1.0
- iOS实现一键打包,免去繁琐
- CentOS5.5+MySQL5.6.33
- spring常用的工具类
- Linux HugePage 特性
- 深入理解JVM 一:运行时数据区
- R语言对微博内容的根据人物分类以及对博文的分词统计
- 中缀表达式转换为后缀表达式--堆栈实现
- 什么是死锁,简述死锁发生的四个必要条件,如何避免与预防死锁
- 模式四:工厂模式(Factory Pattern)——封装对象的创建
- apk文件的签名过程