[root@wwwlxg bin]# ./mysqld --initialize --user=mysql --basedir=/opt/mysql/mysql --datadir=/opt/mysql/mysql/data
[Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
[Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
[Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
[ERROR] Can't find error-message file '/opt/mysql/mysql/data/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
[Warning] InnoDB: New log files created, LSN=45790
[Warning] InnoDB: Creating foreign key constraint system tables.
[Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 73963455-d30a-11e6-bf4f-3aa0c659e827.
[Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
[Note] A temporary password is generated for root@localhost: t&VhwEgod4rm
这里是my.cnf
# These are commonly set, remove the # and set as required.
basedir = /opt/mysql/
datadir = /opt/mysql/data
port = 3306
server_id = 1
socket = /tmp/mysql.sock
lc_messages_dir = /opt/mysql/data
language = /opt/mysql/share/english
'lc-messages-dir‘有一个错误,我想知道它是什么以及如何修复它?(这个问题已经解决了),因为我将它添加到my.cnf :lc_messages_dir = /opt/mysql/data中。
我mysql.server启动时的另一个错误
ps -ef|grep mysql
no other mysql is running
ls -l /opt/mysql
im sure /opt/mysql is mysql:mysql
Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/wwwlxg.pid).
im运行: centos6.4 mysql-5.7.17-linux-glibc2.5-x86_64
发布于 2017-01-20 07:05:17
试一试
my.cnf
[mysqld]
...
lc_messages_dir = /opt/mysql/share
lc_messages = en_US
errmsg.sys通常在/{mysql-path}/mysql/share/ {language} /中,{language}将是'english‘、’西班牙语‘.
有关更多细节:http://dev.mysql.com/doc/refman/5.7/en/error-message-language.html
发布于 2020-02-13 08:42:13
通常,在安装MySQL时,系统中会创建一个用于lc_messages配置的目录,通常在/usr/share/mysql-中。
在my.cnf中,正确的配置如下(在我的例子中是MySQL 8.0):
[mysqld]
lc-messages-dir = /usr/share/mysql-8.0
lc-messages = en_US
如果直接在lc-message-dir中指定语言,例如/usr/share/mysql-8.0/english ( errmsg.sys ),那么您将收到以下警告:
使用pre5.5语义加载来自/usr/share/mysql-8.0/english/的错误消息。如果不打算这样做,请参考文档以获得有效使用--lc-messages-dir和--语言参数。
关键是正确使用lc-messages-dir和lc-messages。
发布于 2020-06-05 10:46:26
必须将--缺省值-file=#作为一行中的第一个参数,如下所示:
./bin/mysqld --defaults-file=my57.cnf --initialize
见更多信息:https://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization.html
希望对你有帮助:)
https://stackoverflow.com/questions/41478645
复制相似问题