Foreword
Before installing wdCP panel is intended primarily for WordPress to build personal blog, then go to WordPress official website and saw that the system requirements are PHP7.3 version and MySQL5.6 above.
So, immediately to upgrade the PHP version ( very convenient, do not bother ), and then the liver super long to get the database upgrade (I believe you can see the twists and turns in this article). Finally, write a blog to WordPress official website screenshots found a "but these are not necessary ......" mentality collapse.
Server Environment
System: CentOS7.7
panel: WDCP v3.3.9
WDCP built databases: MySQL 5.5.62
MySQL upgrade steps
To reduce the possibility of error, preferably the following command is inputted to the terminal as a copy of Linux. Because there are original article stated ( shameless ), you can first command to copy into Notepad, then copy into the terminal. In order to facilitate troubleshooting, I also copied a number of operating results came in.
Because the process to engage in, there is a path issue some commands , I do not know can not be written directly to a .sh
file, then run directly. I can see a lot of blog said, I skeptical attitude, like me try white is not recommended .
1, shut down mysql service, and data backup, placed in a new my.cnf;
service mysqld stop
mkdir -p /www/wdlinux/mysql_bk
cp -pR /www/wdlinux/mysql/data/* /www/wdlinux/mysql_bk
mv /www/wdlinux/etc/my.cnf /www/wdlinux/etc/my_old.cnf
2, the installation environment components needed to compile
yum install cmake gcc gcc-c++ make zlib-devel ncurses-devel bison -y
3, Quguan network to download the corresponding source code and compiler installation package, to be noted that after mysql5.5 compiled using cmake
wget https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.44.tar.gz
tar -zxvf mysql-5.6.44.tar.gz
cd mysql-5.6.44
cmake -DCMAKE_INSTALL_PREFIX=/www/wdlinux/mysql-5.6.44 -DMYSQL_DATADIR=/www/wdlinux/mysql-5.6.44/data -DDOWNLOAD_BOOST=1 -DWITH_BOOST=boost/boost_1_59_0/ -DSYSCONFDIR=/www/wdlinux/etc -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_EMBEDDED_SERVER=1 -DENABLE_DTRACE=0 -DENABLED_LOCAL_INFILE=1 -DDEFAULT_CHARSET=utf8mb4 -DDEFAULT_COLLATION=utf8mb4_general_ci -DEXTRA_CHARSETS=all
make && make install
Command this step more, must not be copied missed ! ! ! While waiting for a long time will be needed to maintain some patience.
4, mysql modify wdcp file in the folder hyperlink **
rm -f /www/wdlinux/mysql
ln -sf /www/wdlinux/mysql-5.6.44 /www/wdlinux/mysql
Note: If you perform this step have a problem, might step instructions to make install
copy the leak ( do not ask, asked that I step on pit ).
5, mysql initiate operation, and given authority
This step is in the order of /www/wdlinux/mysql
execution of the directory, attention switched.
scripts/mysql_install_db --user=mysql --basedir=/www/wdlinux/mysql --datadir=/www/wdlinux/mysql/data
chown -R mysql.mysql /www/wdlinux/mysql/data
6, the operation data reduction **
This step is very pit, step by step command to copy the best! Because after executing the first line of cp
the command (Yaoan many times y
of), due to ask you whether to overwrite, so the copy command behind you are gone.
The third and fourth lines of cp
command need to use the cd
command to /www/wdlinux/mysql-5.6.44
execute the directory, I'm talking about my own directory, you can adjust according to their own circumstances. ( All I stepped pit ah )
mv /www/wdlinux/mysql/data/mysql /www/wdlinux/mysql/data/mysql1
cp -pR /www/wdlinux/mysql_bk/* /www/wdlinux/mysql/data/
cp support-files/mysql.server /www/wdlinux/init.d/mysqld
cp support-files/mysql.server /etc/init.d/mysqld
chmod 755 /www/wdlinux/init.d/mysqld
chmod 755 /etc/init.d/mysqld
7, start mysql, and the use of structural errors after mysql_upgrade repair mysql upgrade **
If you do this step mysql_upgrade
command error, indicating a problem with the implementation of the previous step, you can put the command in step 6, and then execute it again.
service mysqld start
mysql_upgrade -u root -p
Last seen here, tears head ......