报错版本:mysql-5.7.35
[[email protected] support-files]# ./mysql.server start ./mysql.server: line 239: my_print_defaults: command not found ./mysql.server: line 259: cd: /usr/local/mysql: No such file or directory Starting MySQL ERROR! Couldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)
报错信息提示了,启动时没找见(/usr/local/mysql/bin/mysqld_safe)这个命令,我的安装路径不是默认的,是(/opt/software/mysql-5.7.35)
配置my.cnf文件的basedir为当前的安装路径在使用mysql.server启动就好了(mysql5.7某版本之后不提供my-default.cnf文件了,得自己去/etc下新创建文件然后打配置)