mysql --secure-file-priv is set to NULL.Operations related to importing and exporting data are disa...

 

--secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
mysqld: Table 'mysql.plugin' doesn't exist
Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
Failed to open optimizer cost constant tables
Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

使用ZIP安装包通过命令行安装MySQL服务器,如果选择mysqld --initialize-insecure --console创建基于密码空白的管理员账户的初始化data目录数据,需要通过--secure-file-priv指定具有文件操作权限的目录,否则会导致无法生成初始化数据,报--secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled的错误,想要不那么麻烦,建议使用mysqld --initialize --console来初始化MySQL data目录数据,这种方法安装MySQL服务器,会提供一个临时密码,不会出现没有文件操作权限的错误提示,详情可以参考:命令行安装MySQL 5.7+.+

Table 'mysql.plugin' doesn't exist错误的出现,多半是因为从低版本MySQL升级到高版本MySQL时没有使用mysql_upgrade来升级数据库系统表数据,正确的解决方法可以是先将旧的数据库导出为文件,卸载掉MySQL服务重新安装,然后再将数据导入进来。

Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key错误的出现是因为没有配置SSL。

使用MySQL的建议是,不要将数据表创建到MySQL默认的数据库mysql中,而要永远在自己的建立的数据库中创建数据表,一旦数据库系统出现问题,可以将自己的数据库导出,在重新安装MySQL服务器以后将导出的数据库数据导入,避免系统数据库无法备份恢复导致混乱

转载于:https://www.cnblogs.com/yanxiatingyu/p/9333897.html

你可能感兴趣的:(mysql --secure-file-priv is set to NULL.Operations related to importing and exporting data are disa...)