mysql local installation mysql_install_db error -
i working on *nix machine , don't have root
privileges.
i trying install mysql locally using blogpost: http://www.thedance.net/~roth/techblog/localmysql.html
however, stuck @ scripts/mysql_install_db
command.
when run command following error:
fatal error: neither host 'server.address.com' nor 'localhost' looked /usr/bin/resolveip please configure 'hostname' command return correct hostname. if want solve @ later stage, restart script --force option
on further digging, found adding --basedir
resolves issue. generates following errors:
$scripts/mysql_install_db --basedir=. installing mysql system tables...2015-07-17 01:38:15 0 [warning] using unique option prefix key_buffer instead of key_buffer_size deprecated , removed in future release. please use full name instead. 2015-07-17 01:38:15 0 [warning] timestamp implicit default value deprecated. please use --explicit_defaults_for_timestamp server option (see documentation more details). 2015-07-17 01:38:15 0 [note] ./bin/mysqld (mysqld 5.6.25) starting process 10281 ... 2015-07-17 01:38:15 10281 [error] can't find messagefile '/usr/share/mysql/errmsg.sys' 2015-07-17 01:38:15 10281 [warning] can't create test file /var/lib/mysql/head.lower-test 2015-07-17 01:38:15 10281 [warning] can't create test file /var/lib/mysql/head.lower-test ./bin/mysqld: can't change dir '/var/lib/mysql/' (errcode: 13 - permission denied) 2015-07-17 01:38:15 10281 [error] aborting 2015-07-17 01:38:15 10281 [note] binlog end 2015-07-17 01:38:15 10281 [note]
when add --datadir=mydatadir
(where mydatadir local directory) generates following error:
$scripts/mysql_install_db --basedir=. --datadir=mydatadir installing mysql system tables...2015-07-17 01:40:54 0 [warning] using unique option prefix key_buffer instead of key_buffer_size deprecated , removed in future release. please use full name instead. 2015-07-17 01:40:54 0 [warning] timestamp implicit default value deprecated. please use --explicit_defaults_for_timestamp server option (see documentation more details). 2015-07-17 01:40:54 0 [note] ./bin/mysqld (mysqld 5.6.25) starting process 10329 ... 2015-07-17 01:40:54 10329 [error] can't find messagefile '/usr/share/mysql/errmsg.sys'
it trying access system level folders , because of permission issues failing. how install locally. , how setup hostname?
the problem lies on following line in log:
[error] can't find messagefile '/usr/share/mysql/errmsg.sys'
to solve it, add flag command:
--lc-messages-dir="/some/path/you/can/access/without/sudo/"
Comments
Post a Comment