1, prepare mysql5.7.24 package and will 5.7.24 package uploaded to the server (I'm on the/usr/local/SRC)
2, stop the mysql service (I am directly kill process)
??
3, confirm the mysql has stopped
??
4, the backup of the original mysql (double machine negligible)
I am a direct physical file backup, cp -r/data/mysqldata/MNT/data/
6, extract just uploaded 5.7.24 package
The tar XZF mysql - 5.7.24 - Linux - glibc2.12 - x86_64. Tar. Gz
7, replace the original installation directory (because I am under the package is compiled, direct start can use; If it is not compiled, manual compiled by oneself and then follow these steps)
Mysql - 5.7.24 - Linux - mv glibc2.12 - # x86_64 mysql to 5.7.24 change a name
Mv/usr/local/mysql/usr/local/mysql5.6 #, the original installation package also change name is convenient to distinguish the
Mv mysql/usr/local/mysql # 5.7.24 bag will be moved to the/usr/local under
8, start the mysql
Find the mysql service can't start, and then log and no error, judgment for initialization because there is no permission table cause, need to initialize, 5.7 and 5.6 initialization, bin/MSQLD - initializey - user=mysql - datadir=/data/mysqldata - basedir=/usr/local/mysql - defaults - file=/etc/my CNF
Not use scripts/mysql_install_db, but bin/MSQLD initializey, initialization error:/data/mysqldata (data directory) have the file, unable to initialize the
Then according to the error message, the data to all files in the directory delete (rm - rf *), and initialized again, again an error: open the bin - log, error,
Will bin - log. Then in my CNF commented, initialized again, initial success
Finally start the mysql service,./mysqld_safe -- -- the user=mysql & amp;
Log in the database, an error: the password expired, to login, you must use support overdue client to change the password,
But because my database in the cloud, ali didn't do the relevant configuration, couldn't get through the client login, had to want to other way, then the current data directory of all the rm - rf * off, and then the original backup data directory of 5.6 copy to the current directory and skip - grant - is added in the configuration tables=1 (skip inspection authorization table), start again, found that after log in the database, you can start to upgrade the 5.7.24, is this why?????
??
In the end, will skip - grant - tables=1 commented out, also can log in and normal operation,
What a great god to solve???
CodePudding user response:
Here is the MSSQL, the building Lord to send the wrong plateCodePudding user response:
Haven't done to upgrade mysql operation, but the original poster is successful is a good thing,CodePudding user response:
Version of the program, depending on the file, not the data file, see your description is to put the data file reduction, program file does not change, so version still 5.7.24CodePudding user response:
But the mysql startup reads the db directory, logically under the db data file or 5.6, should be an errorCodePudding user response: