26
2023
04
14:34:36

CentOS 配置mysql 踩到的坑



推荐点击下面图片,通过本站淘宝优惠价购买:

image.png

遇到错误一定要看日志 !看日志! 看日志!


每个人在配置的时候,碰到的问题五花八门,即使是编程老鸟也不一定能直接定位到哪里出错了,这时候一定要去看日志,日志文件地址在配置文件、etc/my.cnf 自己定义的,我的地址是 /usr/local/mysql/sql_log/ 找到其中的error,针对性的去解决!

日志记录如下


默认情况下,使用跳过符号链接(或等效的)来禁用符号链接。 考虑不要使用这个选项,因为它已被弃用,并将在未来的版本中被删除。

‘Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it’ is deprecated and will be removed in a future release.


带有隐式DEFAULT值的时间戳已弃用。 请使用——explicit_defaults_for_timestamp服务器选项(更多细节请参阅文档)。

TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).


[Server] Insecure configuration for --secure-file-priv: Location is accessible to all OS users. Consider choosing a different directory.

[Server]——secure-file-priv配置不安全:所有操作系统用户都可以访问该位置。 考虑选择一个不同的目录。


–character-set-server: ‘utf8’ is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.

——character-set-server: 'utf8’目前是字符集UTF8MB3的别名,但在未来的版本中将是UTF8MB4的别名。 为了明确,请考虑使用UTF8MB4。


The setting INNODB_UNDO_TABLESPACES is deprecated and is no longer used. InnoDB always creates 2 undo tablespaces to start with. If you need more, please use CREATE UNDO TABLESPACE.

INNODB_UNDO_TABLESPACES设置已弃用,不再使用。 InnoDB总是先创建2个undo表空间。 如果您需要更多,请使用CREATE UNDO TABLESPACE。


Unable to lock ./ibdata1错误:11


文件操作中的操作系统错误编号11。

Operating system error number 11 in a file operation.


Error number 11 means 'Resource temporarily unavailable

错误号11表示“资源暂时不可用”


Cannot open datafile ‘./ibdata1’

无法打开数据文件’./ibdata1’


Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!.

无法打开或创建系统表空间。 如果您试图向系统表空间添加新的数据文件,但是在这里失败了,那么您现在应该将my.cnf中的innodb_data_file_path编辑回原来的状态,并删除在这次失败的尝试中创建的新ibdata文件。 InnoDB只写那些全是0的文件,但还没有以任何方式使用它们。 但是要小心:不要删除包含您宝贵数据的旧数据文件!


Plugin initialization aborted with error Invalid Filename.

插件初始化因错误无效文件名而中止。


–initialize specified but the data directory has files in it. Aborting.

——初始化指定的,但数据目录中有文件。 流产。


Newly created data directory /usr/local/mysql/data/ is unusable. You can safely remove it.

新创建的数据目录/usr/local/mysql/data/不可用。 你可以安全地把它取出来。


unknown variable ‘sql_model=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES’.

未知变量’ sql_model = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES’。


/usr/local/mysql/ UNDO /undo_001已经存在,所以不能创建UNDO表空间。


InnoDB数据库创建失败。 在尝试再次启动之前,您可能需要删除ibdata1文件。


未知变量’ log-slave-updatas =”。


unknown variable ‘thread_catch_size=2048’.


未知变量’线程捕获大小=2048’。


当把日志中的错误一项项解决的时候,问题就一个个解决了。不要盲目的尝试网上的方法浪费时间!



本文链接:https://www.hqyman.cn/post/3997.html 非本站原创文章欢迎转载,原创文章需保留本站地址!

分享到:





休息一下,本站随机推荐观看栏目:


« 上一篇 下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

您的IP地址是: