[Maria-discuss] [mysqld] Can't find messagefile '/usr/share/mysql/errmsg.sys'
Hi, Compilation Instructions: # uname -a Linux framework 3.16.0-4-686-pae #1 SMP Debian 3.16.43-2+deb8u2 (2017-06-26) i686 GNU/Linux # groupadd mysql # useradd -c "MySQL Server" -g mysql -s /bin/false mysql # cmake . -DBUILD_CONFIG=mysql_release \ -DCMAKE_C_FLAGS="-I/usr/local/include -I/usr/include/i386-linux-gnu" \ -DWITH_INNODB_LZ4=ON -DWITH_INNODB_LZMA=OFF -DWITH_INNODB_LZO=OFF \ -DWITH_ZLIB=system -DWITH_SSL=system \ -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_spanish_ci \ -DWITH_DEBUG=0 -DWITH_VALGRIND=0 # make # make install # export PATH=$PATH:/usr/local/mysql/bin # echo "export PATH=$PATH:/usr/local/mysql/bin" >> /etc/profile # source /etc/profile # cd /usr/local/mysql # chown -R root . # chown -R mysql data # cp ./support-files/my-medium.cnf /etc/my.cnf # ./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --verbose # cp ./support-files/mysql.server /etc/init.d/mysql # chmod +x /etc/init.d/mysql # update-rc.d mysql defaults # service mysql start # ./bin/mysql_secure_installation # ./bin/mysqladmin -u root password Error: # mysqld 2017-06-28 21:37:24 3071039232 [Note] Using unique option prefix 'key_buffer' is error-prone and can break in the future. Please use the full name 'key_buffer_size' instead. 2017-06-28 21:37:24 3071039232 [Note] mysqld (mysqld 10.2.6-MariaDB-log) starting as process 2600 ... 2017-06-28 21:37:24 3071039232 [ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys' 2017-06-28 21:37:24 3071039232 [ERROR] Aborting # ls -l /usr/share/mysql ls: cannot access /usr/share/mysql: No such file or directory How to indicate the correct directory permanently ? /usr/share/mysql to /usr/local/mysql/share # ls /usr/local/mysql/share aclocal german mysql_performance_tables.sql romanian charsets greek mysql_system_tables_data.sql russian czech hungarian mysql_system_tables.sql serbian danish install_spider.sql mysql_test_data_timezone.sql slovak dutch italian mysql_to_mariadb.sql spanish english japanese norwegian swedish errmsg-utf8.txt korean norwegian-ny ukrainian estonian maria_add_gis_sp_bootstrap.sql pkgconfig fill_help_tables.sql maria_add_gis_sp.sql polish french mroonga portuguese Guillermo Céspedes Full Stack Developer
Hi, Guillermo! On Jun 28, Guillermo Cespedes wrote:
Hi,
Compilation Instructions: # uname -a Linux framework 3.16.0-4-686-pae #1 SMP Debian 3.16.43-2+deb8u2 (2017-06-26) i686 GNU/Linux
# groupadd mysql # useradd -c "MySQL Server" -g mysql -s /bin/false mysql
# cmake . -DBUILD_CONFIG=mysql_release \ -DCMAKE_C_FLAGS="-I/usr/local/include -I/usr/include/i386-linux-gnu" \ -DWITH_INNODB_LZ4=ON -DWITH_INNODB_LZMA=OFF -DWITH_INNODB_LZO=OFF \ -DWITH_ZLIB=system -DWITH_SSL=system \ -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_spanish_ci \ -DWITH_DEBUG=0 -DWITH_VALGRIND=0 Error:
# mysqld 2017-06-28 21:37:24 3071039232 [Note] Using unique option prefix 'key_buffer' is error-prone and can break in the future. Please use the full name 'key_buffer_size' instead. 2017-06-28 21:37:24 3071039232 [Note] mysqld (mysqld 10.2.6-MariaDB-log) starting as process 2600 ... 2017-06-28 21:37:24 3071039232 [ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'
The server, if compiled as you did, should use /usr/local/mysql/share. Most probably /usr/share/mysql is coming from one of your my.cnf files. Check /etc/my.cnf, ~/.my.cnf, etc. Run "my_print_defaults --mysqld". Regards, Sergei Chief Architect MariaDB and security@mariadb.org
Hi, Sergei. I have two my.cnf files: /etc/my.cnf and /etc/mysql/my.cnf In /etc/mysql/my.cnf: basedir, datadir and lc-messages-dir They are pointing to an incorrect directory. I can avoid this when I compile mariadb, or I have to modify it after compiling. ? # my_print_defaults —mysqld --port=3306 --socket=/tmp/mysql.sock --skip-external-locking --key_buffer_size=16M --max_allowed_packet=1M --table_open_cache=64 --sort_buffer_size=512K --net_buffer_length=8K --read_buffer_size=256K --read_rnd_buffer_size=512K --myisam_sort_buffer_size=8M --log-bin=mysql-bin --binlog_format=mixed --server-id=1 --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306 --basedir=/usr --datadir=/var/lib/mysql --tmpdir=/tmp --lc-messages-dir=/usr/share/mysql --skip-external-locking --bind-address=127.0.0.1 --key_buffer=16M --max_allowed_packet=16M --thread_stack=192K --thread_cache_size=8 --myisam-recover=BACKUP --query_cache_limit=1M --query_cache_size=16M --log_error=/var/log/mysql/error.log --expire_logs_days=10 --max_binlog_size=100M — # cat /etc/my.cnf # Example MariaDB config file for medium systems. # # This is for a system with little memory (32M - 64M) where MariaDB plays # an important part, or systems up to 128M where MariaDB is used together with # other programs (such as a web server) # # MariaDB programs look for option files in a set of # locations which depend on the deployment platform. # You can copy this option file to one of those # locations. For information about these locations, do: # 'my_print_defaults --help' and see what is printed under # Default options are read from the following files in the given order: # More information at: http://dev.mysql.com/doc/mysql/en/option-files.html # # In this file, you can use all long options that a program supports. # If you want to know which options a program supports, run the program # with the "--help" option. # The following options will be passed to all MariaDB clients [client] #password = your_password port = 3306 socket = /tmp/mysql.sock # Here follows entries for some specific programs # The MariaDB server [mysqld] port = 3306 socket = /tmp/mysql.sock skip-external-locking key_buffer_size = 16M max_allowed_packet = 1M table_open_cache = 64 sort_buffer_size = 512K net_buffer_length = 8K read_buffer_size = 256K read_rnd_buffer_size = 512K myisam_sort_buffer_size = 8M # Point the following paths to different dedicated disks #tmpdir = /tmp/ # Don't listen on a TCP/IP port at all. This can be a security enhancement, # if all processes that need to connect to mysqld run on the same host. # All interaction with mysqld must be made via Unix sockets or named pipes. # Note that using this option without enabling named pipes on Windows # (via the "enable-named-pipe" option) will render mysqld useless! # #skip-networking # Replication Master Server (default) # binary logging is required for replication log-bin=mysql-bin # binary logging format - mixed recommended binlog_format=mixed # required unique id between 1 and 2^32 - 1 # defaults to 1 if master-host is not set # but will not function as a master if omitted server-id = 1 # Replication Slave (comment out master section to use this) # # To configure this host as a replication slave, you can choose between # two methods : # # 1) Use the CHANGE MASTER TO command (fully described in our manual) - # the syntax is: # # CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>, # MASTER_USER=<user>, MASTER_PASSWORD=<password> ; # # where you replace <host>, <user>, <password> by quoted strings and # <port> by the master's port number (3306 by default). # # Example: # # CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306, # MASTER_USER='joe', MASTER_PASSWORD='secret'; # # OR # # 2) Set the variables below. However, in case you choose this method, then # start replication for the first time (even unsuccessfully, for example # if you mistyped the password in master-password and the slave fails to # connect), the slave will create a master.info file, and any later # change in this file to the variables' values below will be ignored and # overridden by the content of the master.info file, unless you shutdown # the slave server, delete master.info and restart the slaver server. # For that reason, you may want to leave the lines below untouched # (commented) and instead use CHANGE MASTER TO (see above) # # required unique id between 2 and 2^32 - 1 # (and different from the master) # defaults to 2 if master-host is set # but will not function as a slave if omitted #server-id = 2 # # The replication master for this slave - required #master-host = <hostname> # # The username the slave will use for authentication when connecting # to the master - required #master-user = <username> # # The password the slave will authenticate with when connecting to # the master - required #master-password = <password> # # The port the master is listening on. # optional - defaults to 3306 #master-port = <port> # # binary logging - not required for slaves, but recommended #log-bin=mysql-bin # Uncomment the following if you are using InnoDB tables #innodb_data_home_dir = /usr/local/mysql/data #innodb_data_file_path = ibdata1:10M:autoextend #innodb_log_group_home_dir = /usr/local/mysql/data # You can set .._buffer_pool_size up to 50 - 80 % # of RAM but beware of setting memory usage too high #innodb_buffer_pool_size = 16M #innodb_additional_mem_pool_size = 2M # Set .._log_file_size to 25 % of buffer pool size #innodb_log_file_size = 5M #innodb_log_buffer_size = 8M #innodb_flush_log_at_trx_commit = 1 #innodb_lock_wait_timeout = 50 [mysqldump] quick max_allowed_packet = 16M [mysql] no-auto-rehash # Remove the next comment character if you are not familiar with SQL #safe-updates [myisamchk] key_buffer_size = 20M sort_buffer_size = 20M read_buffer = 2M write_buffer = 2M [mysqlhotcopy] interactive-timeout —— # cat /etc/mysql/my.cnf # # The MySQL database server configuration file. # # You can copy this to one of: # - "/etc/mysql/my.cnf" to set global options, # - "~/.my.cnf" to set user-specific options. # # One can use all long options that the program supports. # Run program with --help to get a list of available options and with # --print-defaults to see which it would actually understand and use. # # For explanations see # http://dev.mysql.com/doc/mysql/en/server-system-variables.html # This will be passed to all mysql clients # It has been reported that passwords should be enclosed with ticks/quotes # escpecially if they contain "#" chars... # Remember to edit /etc/mysql/debian.cnf when changing the socket location. [client] port = 3306 socket = /var/run/mysqld/mysqld.sock # Here is entries for some specific programs # The following values assume you have at least 32M ram # This was formally known as [safe_mysqld]. Both versions are currently parsed. [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] # # * Basic Settings # user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp lc-messages-dir = /usr/share/mysql skip-external-locking # # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. bind-address = 127.0.0.1 # # * Fine Tuning # key_buffer = 16M max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 8 # This replaces the startup script and checks MyISAM tables if needed # the first time they are touched myisam-recover = BACKUP #max_connections = 100 #table_cache = 64 #thread_concurrency = 10 # # * Query Cache Configuration # query_cache_limit = 1M query_cache_size = 16M # # * Logging and Replication # # Both location gets rotated by the cronjob. # Be aware that this log type is a performance killer. # As of 5.1 you can enable the log at runtime! #general_log_file = /var/log/mysql/mysql.log #general_log = 1 # # Error log - should be very few entries. # log_error = /var/log/mysql/error.log # # Here you can see queries with especially long duration #slow_query_log_file = /var/log/mysql/mysql-slow.log #slow_query_log = 1 #long_query_time = 2 #log_queries_not_using_indexes # # The following can be used as easy to replay backup logs or for replication. # note: if you are setting up a replication slave, see README.Debian about # other settings you may need to change. #server-id = 1 #log_bin = /var/log/mysql/mysql-bin.log expire_logs_days = 10 max_binlog_size = 100M #binlog_do_db = include_database_name #binlog_ignore_db = include_database_name # # * InnoDB # # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. # Read the manual for more InnoDB related options. There are many! # # * Security Features # # Read the manual, too, if you want chroot! # chroot = /var/lib/mysql/ # # For generating SSL certificates I recommend the OpenSSL GUI "tinyca". # # ssl-ca=/etc/mysql/cacert.pem # ssl-cert=/etc/mysql/server-cert.pem # ssl-key=/etc/mysql/server-key.pem [mysqldump] quick quote-names max_allowed_packet = 16M [mysql] #no-auto-rehash # faster start of mysql but no tab completition [isamchk] key_buffer = 16M # # * IMPORTANT: Additional settings that can override those from this file! # The files must end with '.cnf', otherwise they'll be ignored. # !includedir /etc/mysql/conf.d/ Guillermo Céspedes Full Stack Developer
El 29 jun. 2017, a las 07:00, Sergei Golubchik <serg@mariadb.org> escribió:
my_print_defaults --mysqld
Hi, Guillermo! On Jun 29, Guillermo Cespedes wrote:
Hi, Sergei.
I have two my.cnf files: /etc/my.cnf and /etc/mysql/my.cnf
In /etc/mysql/my.cnf:
basedir, datadir and lc-messages-dir
They are pointing to an incorrect directory.
I can avoid this when I compile mariadb, or I have to modify it after compiling. ?
It's in the manual, did you try to look there? https://mariadb.com/kb/en/mariadb/configuring-mariadb-with-mycnf/ Regards, Sergei Chief Architect MariaDB and security@mariadb.org
Thanks, I'll use the command: # sed -i 's/ PATH_OLD / PATH_NEW' /etc/mysql/my.cnf … Regards. Guillermo Céspedes Full Stack Developer
El 29 jun. 2017, a las 14:11, Sergei Golubchik <serg@mariadb.org> escribió:
Hi, Guillermo!
On Jun 29, Guillermo Cespedes wrote:
Hi, Sergei.
I have two my.cnf files: /etc/my.cnf and /etc/mysql/my.cnf
In /etc/mysql/my.cnf:
basedir, datadir and lc-messages-dir
They are pointing to an incorrect directory.
I can avoid this when I compile mariadb, or I have to modify it after compiling. ?
It's in the manual, did you try to look there?
https://mariadb.com/kb/en/mariadb/configuring-mariadb-with-mycnf/
Regards, Sergei Chief Architect MariaDB and security@mariadb.org
Hi, I share the solution. # cp ./support-files/my-medium.cnf /etc/my.cnf /etc/mysql/my.cnf # sed -i 's#lc-messages-dir.*=.*/usr/share/mysql#lc-messages-dir = /usr/local/mysql/share#g' /etc/mysql/my.cnf # sed -i 's#basedir.*=.*/usr#basedir = /usr/local/mysql#g' /etc/mysql/my.cnf # sed -i 's#datadir.*=.*/var/lib/mysql#datadir = /usr/local/mysql/data#g' /etc/mysql/my.cnf /etc/my.cnf # sed -i 's#socket.*=.*/tmp/mysql.sock#socket = /var/run/mysqld/mysqld.sock#g' /etc/my.cnf # my_print_defaults --mysqld Thanks for the help. Guillermo Céspedes Full Stack Developer
El 29 jun. 2017, a las 14:18, Guillermo Cespedes <dev.dertin@gmail.com> escribió:
Thanks, I'll use the command:
# sed -i 's/ PATH_OLD / PATH_NEW' /etc/mysql/my.cnf …
Regards. Guillermo Céspedes Full Stack Developer
El 29 jun. 2017, a las 14:11, Sergei Golubchik <serg@mariadb.org> escribió:
Hi, Guillermo!
On Jun 29, Guillermo Cespedes wrote:
Hi, Sergei.
I have two my.cnf files: /etc/my.cnf and /etc/mysql/my.cnf
In /etc/mysql/my.cnf:
basedir, datadir and lc-messages-dir
They are pointing to an incorrect directory.
I can avoid this when I compile mariadb, or I have to modify it after compiling. ?
It's in the manual, did you try to look there?
https://mariadb.com/kb/en/mariadb/configuring-mariadb-with-mycnf/
Regards, Sergei Chief Architect MariaDB and security@mariadb.org
participants (2)
-
Guillermo Cespedes
-
Sergei Golubchik