我今天想重启一下mysql,结果启动不起来了

linux 报错:
Starting MySQL. ERROR! The server quit without updating PID file (/var/run/mysqld/mysqld.pid).

mysql日志报错:
2022-04-21 11:10:22 28029 [Note] Plugin 'FEDERATED' is disabled.
/www/server/mysql/bin/mysqld: Unknown storage engine 'InnoDB'
2022-04-21 11:10:22 28029 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2022-04-21 11:10:22 28029 [Note] InnoDB: Using atomics to ref count buffer pool pages
2022-04-21 11:10:22 28029 [Note] InnoDB: The InnoDB memory heap is disabled
2022-04-21 11:10:22 28029 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2022-04-21 11:10:22 28029 [Note] InnoDB: Memory barrier is not used
2022-04-21 11:10:22 28029 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-04-21 11:10:22 28029 [Note] InnoDB: Using Linux native AIO
2022-04-21 11:10:22 28029 [Note] InnoDB: Using CPU crc32 instructions
2022-04-21 11:10:22 28029 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2022-04-21 11:10:22 28029 [Note] InnoDB: Completed initialization of buffer pool
2022-04-21 11:10:22 28029 [Note] InnoDB: Highest supported file format is Barracuda.
InnoDB: No valid checkpoint found.
InnoDB: If you are attempting downgrade from MySQL 5.7.9 or later,
InnoDB: please refer to http://dev.mysql.com/doc/refman/5.6/en/upgrading-downgrading.html
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/error-creating-innodb.html
2022-04-21 11:10:22 28029 [ERROR] Plugin 'InnoDB' init function returned error.
2022-04-21 11:10:22 28029 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2022-04-21 11:10:22 28029 [ERROR] Unknown/unsupported storage engine: InnoDB
2022-04-21 11:10:22 28029 [ERROR] Aborting

按照指示,我在/var/run/mysqld目录添加mysqld.pid文件,但是每次启动都会自动删掉,请问要怎么解决呀,急,而且我按照网上说的,usr/local/mysql也没找到安装目录

[root@VM-16-6-centos bin]# whereis mysql
mysql: /usr/bin/mysql /usr/lib/mysql /usr/lib64/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz

[root@VM-16-6-centos bin]# which mysql
/usr/bin/mysql

pid是mysqld服务启动成功后创建的,你创建它干啥?
你这个问题跟pid没关系。
看报错信息是innodb引擎的问题,我猜测你的数据目录没挂载上,连mysql的系统表都看不到了。
我来大概复现下你的场景:你的mysql安装后,系统中挂载了一块盘单独放数据文件,但是没写入fstab,所以当你重启后,这个盘就没有自动挂载,在其中的mysql系统表和用户库都找不到,启动自然报错了。
fdisk -l看看是哪块盘,找到它,对照my.cnf配置文件的datadir目录,把它挂载回去再启动。

你应该是你当前登录的用户和mysql启动的用户不一致导致的, 安装目录每个人都可以自定义的,你查下:whereis mysql

据说新建了pid文件还要授权,你可以先参考一下这个文章:
https://blog.csdn.net/qq_41307443/article/details/100155001