- 积分
- 12
- 威望
-
- 金钱
-
- 注册时间
- 2019-4-8
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
本帖最后由 pessoa 于 2020-8-4 17:10 编辑
军哥好!
今天我用 `upgrade1.x-1.7.sh` 脚本将 lnmp 1.5 升级至 lnmp 1.7,成功后又用 lnmp 1.7 的 `upgrade.sh` 脚本升级了 PHP for LNMP 和 Nginx,都成功了。
随后尝试将 MySQL 升级为 MariaDB,升级失败。升级日志 `upgrade_mysql2mariadb20200804132615.log` 如下:
- [ 58%] Built target trnman-t
- [ 58%] Built target ma_pagecache_single_8k-t
- [ 58%] Built target ma_pagecache_single_64k-t
- [ 58%] Building C object storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/expr.c.o
- cc1: out of memory allocating 65536 bytes after a total of 575221760 bytes
- storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/build.make:374: recipe for target 'storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/expr.c.o' failed
- make[2]: *** [storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/expr.c.o] Error 1
- CMakeFiles/Makefile2:6534: recipe for target 'storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/all' failed
- make[1]: *** [storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/all] Error 2
- Makefile:162: recipe for target 'all' failed
- make: *** [all] Error 2
- include/upgrade_mysql2mariadb.sh: line 204: /usr/local/mariadb/scripts/mysql_install_db: No such file or directory
- Synchronizing state of mariadb.service with SysV service script with /lib/systemd/systemd-sysv-install.
- Executing: /lib/systemd/systemd-sysv-install enable mariadb
- Add mariadb service at system startup...
- Synchronizing state of mariadb.service with SysV service script with /lib/systemd/systemd-sysv-install.
- Executing: /lib/systemd/systemd-sysv-install enable mariadb
- Starting mariadb (via systemctl): mariadb.service.
- Restarting mariadb (via systemctl): mariadb.service.
- include/mariadb.sh: line 42: /usr/local/mariadb/bin/mysqladmin: No such file or directory
- Restarting mariadb (via systemctl): mariadb.service.
- include/main.sh: line 744: /usr/local/mysql/bin/mysql: No such file or directory
- failed, try other way...
- Restarting mariadb (via systemctl): mariadb.service.
- include/mariadb.sh: line 59: /usr/local/mariadb/bin/mysql: No such file or directory
- Set password failed!
- include/mariadb.sh: line 62: /usr/local/mariadb/bin/mysql: No such file or directory
- FLUSH PRIVILEGES failed!
- include/main.sh: line 744: /usr/local/mysql/bin/mysql: No such file or directory
- Update root password...
- include/main.sh: line 744: /usr/local/mysql/bin/mysql: No such file or directory
- ... Failed!
- Remove anonymous users...
- include/main.sh: line 744: /usr/local/mysql/bin/mysql: No such file or directory
- include/main.sh: line 744: /usr/local/mysql/bin/mysql: No such file or directory
- ... Failed!
- Disallow root login remotely...
- include/main.sh: line 744: /usr/local/mysql/bin/mysql: No such file or directory
- ... Failed!
- Remove test database...
- include/main.sh: line 744: /usr/local/mysql/bin/mysql: No such file or directory
- ... Failed!
- Reload privilege tables...
- include/main.sh: line 744: /usr/local/mysql/bin/mysql: No such file or directory
- ... Failed!
- Stopping mariadb (via systemctl): mariadb.service.
- Starting mariadb (via systemctl): mariadb.service.
- Restore backup databases...
- include/upgrade_mysql2mariadb.sh: line 214: /usr/local/mariadb/bin/mysql: No such file or directory
- MariaDB databases import failed,Please import databases manually!
- Repair databases...
- include/upgrade_mysql2mariadb.sh: line 218: /usr/local/mariadb/bin/mysql_upgrade: No such file or directory
- Add to autostart...
- Add mariadb service at system startup...
- Synchronizing state of mariadb.service with SysV service script with /lib/systemd/systemd-sysv-install.
- Executing: /lib/systemd/systemd-sysv-install enable mariadb
- Stopping MariaDB...
- Stopping mariadb (via systemctl): mariadb.service.
- +-------------------------------------------+
- | Manager for LNMP, Written by Licess |
- +-------------------------------------------+
- | https://lnmp.org |
- +-------------------------------------------+
- Starting LNMP...
- Starting nginx... nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /usr/local/nginx/conf/vhost/domian1.foo.conf:46
- nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /usr/local/nginx/conf/vhost/domain2.foo.conf:46
- done
- Starting mariadb (via systemctl): mariadb.service.
- Starting php-fpm done
- ^[[0;31m======== upgrade MySQL to MariaDB failed ======^[[0m
- ^[[0;31mupgrade MariaDB log: /root/upgrade_mysql2mariadb.log^[[0m
- You upload upgrade_mysql2mariadb.log to LNMP Forum for help.
复制代码
之后我按 LNMP 1.2/1.3或更高版本升级Nginx、MySQL/MariaDB、PHP教程 一文中 “三、MySQL升级至MariaDB脚本” 小节中描述尝试恢复,按描述依次进行:- # 1 将 /usr/local/mysql2mariadb日期目录下面的 init.d.mysql2mariadb.bak.日期的文件拷贝到 /etc/init.d/ 目录下并重命名为 mysql
- cp /usr/local/mysql2mariadb20200804132615/init.dmysql2mariadb.bak.20200804132615 /etc/init.d/mysql
- # 2 将 /usr/local/mysql2mariadb日期目录下面的 my.cnf.mysql2mariadbbak.日期拷贝到 /etc/ 目录下并重命名为 my.cnf
- cp /usr/local/mysql2mariadb20200804132615/my.cnf.mysql2mariadbbak.20200804132615 /etc/my.cnf
- # 3 将 /usr/local/ 下的 mysql2mariadb日期目录重命名为 mysql
- cp /usr/local/mysql2mariadb20200804132615 /usr/local/mysql -r
复制代码
随后尝试用 systemctl 启动 mysql,失败:- ➜ ~ systemctl status mysql.service
- ● mysql.service - LSB: start and stop MySQL
- Loaded: loaded (/etc/init.d/mysql; generated)
- Active: failed (Result: exit-code) since Tue 2020-08-04 16:20:04 CST; 38min ago
- Docs: man:systemd-sysv-generator(8)
- Process: 31998 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)
- Aug 04 16:20:03 ubuntu-wordpress systemd[1]: Starting LSB: start and stop MySQL...
- Aug 04 16:20:03 ubuntu-wordpress mysql[31998]: Starting MySQL
- Aug 04 16:20:04 ubuntu-wordpress mysql[31998]: . * The server quit without updating PID file (/usr/local/mysql/var/ubuntu-wordpress.pid).
- Aug 04 16:20:04 ubuntu-wordpress systemd[1]: mysql.service: Control process exited, code=exited status=1
- Aug 04 16:20:04 ubuntu-wordpress systemd[1]: mysql.service: Failed with result 'exit-code'.
- Aug 04 16:20:04 ubuntu-wordpress systemd[1]: Failed to start LSB: start and stop MySQL.
复制代码
我现在想完成从 MySQL 至 MariaDB 的切换,请问我应该怎么做?
|
|