ubuntu do-release-upgrade之后,ubuntu mysql fail to start with exit code 1
主要原因是缺少了一些动态链接库*.so.*之类的文件,具体排除方法如下:

ldd /usr/bin/mysql OR /usr/sbin/mysql
查看哪些so文件是not found,举例说明:本机升级之后缺少如下文件:

    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x0000729bc5407000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x0000729bc5402000)
    **libcrypto.so.1.1 => not found
    libssl.so.1.1 => not found**
    libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x0000729bc53ef000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x0000729bc53e8000)
    **libtinfo.so.5 => not found**
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x0000729bc5000000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x0000729bc52ff000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x0000729bc52d2000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x0000729bc4c00000)
    /lib64/ld-linux-x86-64.so.2 (0x0000729bc5418000)

然后针对性的安装缺失文件即可。

另外,还要继续查看mysqld缺少哪些so文件,
ldd /usr/local/mysql/bin/mysqld OR /usr/sbin/mysqld OR /usr/bin/mysqld
继续将缺失的文件找回来或者安装回来,
比如可以将版本号修改复制
sudo cp /usr/lib/x86_64-linux-gnu/libicuuc.so /lib/x86_64-linux-gnu/libicuuc.so.70

参考文件:
https://blog.csdn.net/u013421629/article/details/136951006
https://www.cnblogs.com/hufulinblog/p/10124001.html

全局配置:

composer config -g --unset repos.packagist
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
composer config -g repos.packagist composer https://mirrors.tencent.com/composer/

项目专属配置:

composer config --unset repos.packagist
composer config repo.packagist composer https://mirrors.aliyun.com/composer/

//show custom post type in archives.
function ns_set_archive_post_types($query){
    
    // We cannot use 'is_archive' here because post type archives should not be included
    $is_target_query = 
            !is_admin() && 
            $query->is_main_query() && 
            ($query->is_date || 
            $query->is_author || 
            $query->is_category || 
            $query->is_tag || 
            $query->is_tax); 
            
    if($is_target_query){
        $target_types = array('post', 'ns_book_cpt');
        $query->set('post_type', $target_types);
    }
}
add_action('pre_get_posts', 'ns_set_archive_post_types', 10, 1);

ref:https://www.rafaelcardero.com/courses/post-types-in-wordpress/l/109/