Linux 升级 MySQL 5.7
来源:互联网 发布:网络投资挣钱 编辑:程序博客网 时间:2024/05/22 06:45
I received the qualys report on the vulnerabilities as below:
and it seems we will have to upgrade to the latest MYSQL version 5.7:
https://dev.mysql.com/doc/refman/5.7/en/
Backup your DB
[root@machine mysql]# mysqldump --opt -u [user_name] -p [database_name] > [backup_file].dump
Stop MySQL 5.1 and remove it
[root@machine mysql]# yum list installed | grep mysql[root@machine mysql]# yum -y remove mysql.x86_64
Download Latest MySQL 5.7 and install with yum
[root@machine mysql]# yum install https://dev.mysql.com/get/mysql57-community-release-el6-11.noarch.rpm[root@machine mysql]# yum repolist all | grep mysql[root@machine mysql]# yum-config-manager --disable mysql55-community[root@machine mysql]# yum-config-manager --disable mysql56-community[root@machine mysql]# yum-config-manager --enable mysql57-community-dmr[root@machine mysql]# yum repolist enabled | grep mysql[root@machine mysql]# yum install mysql-community-server
Start MySQL 5.7 and check
[root@machine mysql]# service mysql start[root@machine mysql]# chkconfig --list | grep mysqld[root@machine mysql]# chkconfig mysqld on
Login in import data
Your temporary password for “root” is here:
[root@machine mysql]# grep "temporary password" /var/log/mysqld.log[root@machine mysql]# mysql -uroot -p mysql> create schema [SCHEMA_NAME];mysql> use [SCHEMA_NAME];mysql> source [backup_file].dump;
or you can use mysqldump or mysql from shell
mysql --default-character-set utf8 -h127.0.0.1 -uroot -p < [backup_file].dump;
Problems
1548-Cannot load from mysql.proc. The table is probably corrupted
This is caused by the bug http://bugs.mysql.com/bug.php?id=50183
The column “comment” is char(64) in MySQL5.1 but shall be text in MySQL5.7, so you should change the type of it.mysql> ALTER TABLE `proc` MODIFY COLUMN `comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL;ERROR 1067 (42000): Invalid default value for 'modified'mysql> ALTER TABLE `proc` CHANGE `modified` `modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;Query OK, 5 rows affected, 1 warning (0.01 sec)Records: 5 Duplicates: 0 Warnings: 1 mysql> ALTER TABLE `proc` MODIFY COLUMN `comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL;Query OK, 5 rows affected (0.01 sec)Records: 5 Duplicates: 0 Warnings: 0
阅读全文
0 0
- Linux 升级 MySQL 5.7
- linux升级mysql到5.7
- Linux yum 升级mysql
- mysql 5.6 升级5.7
- phpstudy升级mysql 5.7
- mysql 5.6 升级 mysql 5.7
- mysql 5.6 升级 mysql 5.7
- Mysql升级到最新版本mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz
- MySQL 5.6 --> 5.7 的升级
- 升级 MySQL
- mysql升级
- MYSQL 升级
- mysql升级
- MySQL升级
- mysql升级
- mysql升级
- Mysql 升级
- mysql升级(5.6.15升级到5.7.15)
- TCP_server
- Android使用map存类名然后直接使用,很方便
- HDU 2795 Billboard 线段树
- SDUT 3661 山峰
- CSS top、margin-top和padding-top的区别
- Linux 升级 MySQL 5.7
- QThread类参考
- 在eclipse中启动tomcat,无法访问localhost:8080
- <转载>如何用git将项目代码上传到github
- java StringBuffer类和StringBuilder类
- c:if 判断集合是否为空
- Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflow
- new Function
- 深入浅出Java分布式系统通信