Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to upgrade the MySQL version of wdCP panel

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article is about how to upgrade MySQL version of wdCP panel. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.

Before installing wdCP panel is mainly to build WordPress personal blog, and then go to WordPress official website to see, found that the system requirements are PHP 7.3 version and MySQL 5.6 version above.

So, immediately went to upgrade the PHP version (very convenient, not troublesome), and then liver for a long time to get the database upgrade (I believe in this article can see my twists and turns). Finally, when I wrote the blog and went to the WordPress website screenshot, I found a sentence "But these are not necessary...", and my mentality collapsed.

server environment

System: CentOS 7.7

Panel: wdCP v3.3.9

wdCP built-in database: MySQL 5.5.62

MySQL upgrade steps

To reduce the possibility of errors, it is best to type the following command into the Linux terminal as a copy. Because the article has original declaration (shameless), you can copy the command to Notepad first, and then copy it into the terminal. For ease of troubleshooting, I copied some of the results of the run.

Because in the process of doing it, some commands have path problems, and I don't know if I can write a. sh file directly and run it directly. See a lot of blogs say yes, I have a skeptical attitude, do not recommend such as me to try small white.

1. Close the mysql service and backup the data into the new my.cnf; service mysqld stopmkdir-p/www/wdlinux/mysql_bkcp-pR/www/wdlinux/mysql/data/*/www/wdlinux/mysql_bkmv/www/wdlinux/etc/my. cnf/www/wdlinux/etc/my_old. cnf

2. Install the environment components required for compilation yum install cmake gcc gcc-c ++ make zlib-devel ncurses-devel bison-y3. Download the corresponding source package from the official website and compile and install it. It should be noted that mysql 5.5 is compiled using cmake wget www.example.com-zxvf mysql-5.6.44.tar.gzcd mysql-5.6.gzcd 44cmake-DCMAKE_INSTALL_PREFIX =/www/wdlinux/mysql-5.6.44-DMYSQL_DATADIR =/www/wdlinux/mysql-5.6.44/data-DDOWNLOAD_BOOST = 1-@ITH_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_https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.44.tar.gztar

There are many commands for this step, so don't copy them!!! At the same time, the waiting time will be longer and you need to maintain a certain amount of patience.

4. Modify the mysql folder hyperlink in wdcp ** rm-f/www/wdlinux/mysqlln-sf/www/wdlinux/mysql-5.6.44/www/wdlinux/mysql

Note: If you have a problem with this step, it means that the previous step may have missed the copy of make install (don't ask, ask is that I stepped on the pit).

5. Initialize mysql and grant permissions

The command for this step is executed under the/www/wdlinux/mysql directory, pay attention to switching.

scripts/mysql_install_db--user = mysql--basedir =/www/wdlinux/mysql--datadir =/www/wdlinux/mysql/datacown-R mysql. mysql/www/wdlinux/mysql/data 6, Operation data restore **

This step was quite deceptive. It was best to copy the order step by step! Because after executing the first cp command (which requires pressing y many times), you are asked if you want to overwrite, so the commands you copy later are gone.

The cp command on lines 3 and 4 needs to be executed under the directory/www/wdlinux/mysql-5.6.44 with the cd command. I am talking about my own directory. You can adjust it according to your own situation. (All the holes I stepped on.)

mv/www/wdlinux/mysql/data/mysql/www/wdlinux/mysql/data/mysql 1cp-pR/www/wdlinux/mysql_bk/*/www/wdlinux/mysql/data/cp support-files/mysql. server/www/wdlinux/init. d/mysqldcp support-files/mysql. server/etc/init. d/mysqldchmod 755/www/wdlinux/init. d/mysqldchmod 755/etc/init. d/mysqld 7. Start mysql and use mysql_upgrade to fix mysql upgraded structural errors **

If the mysql_upgrade command in this step reports an error, it means that there is a problem with the previous step, and you can execute the command in step 6 again.

service mysqld startmysql_upgrade -u root -p

The last thing I saw was tears...

Thank you for reading! About "wdCP panel MySQL version how to upgrade" This article is shared here, I hope the above content can have some help for everyone, so that everyone can learn more knowledge, if you think the article is good, you can share it to let more people see it!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report