mysql 安装错误:FATAL ERROR: Neither host '* nor 'localhost' could be looked up with /usr/bin/resolveip

1、采用命令 mysql_install_db –user=mysql 安装时报错
$ sudo ./scripts/mysql_install_db –user=mysql

FATAL ERROR: Neither host ‘liminpc’ nor ‘localhost’ could be looked up with
/usr/bin/resolveip
Please configure the ‘hostname’ command to return a correct
hostname.
If you want to solve this at a later stage, restart this script
with the –force option

2.命令增加 –datadir=/usr/local/mysql/data,启动成功

sudo ./scripts/mysql_install_db –user=mysql –basedir=/usr/local/mysql –datadir=/usr/local/mysql/data –skip-name-resolve

**@****pc:/usr/local/mysql$ sudo ./scripts/mysql_install_db –user=mysql –basedir=/usr/local/mysql –datadir=/usr/local/mysql/data –skip-name-resolve
Installing MySQL system tables…2015-08-24 10:55:19 0 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
2015-08-24 10:55:19 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use –explicit_defaults_for_timestamp server option (see documentation for more details).
2015-08-24 10:55:19 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.25-enterprise-commercial-advanced) starting as process 3319 …
2015-08-24 10:55:19 3319 [Warning] Using pre 5.5 semantics to load error messages from /usr/share/mysql/.
2015-08-24 10:55:19 3319 [Warning] If this is not intended, refer to the documentation for valid usage of –lc-messages-dir and –language parameters.
OK

Filling help tables…2015-08-24 10:55:26 0 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
2015-08-24 10:55:26 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use –explicit_defaults_for_timestamp server option (see documentation for more details).
2015-08-24 10:55:26 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.25-enterprise-commercial-advanced) starting as process 3356 …
2015-08-24 10:55:26 3356 [Warning] Using pre 5.5 semantics to load error messages from /usr/share/mysql/.
2015-08-24 10:55:26 3356 [Warning] If this is not intended, refer to the documentation for valid usage of –lc-messages-dir and –language parameters.
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/local/mysql/bin/mysqladmin -u root password ‘new-password’
/usr/local/mysql/bin/mysqladmin -u root -h 192.168.1.159 password ‘new-password’

Alternatively you can run:

/usr/local/mysql/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

cd . ; /usr/local/mysql/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

cd mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/

The latest information about MySQL is available on the web at

http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

WARNING: Found existing config file /usr/local/mysql/my.cnf on the system.
Because this file might be in use, it was not replaced,
but was used in bootstrap (unless you used –defaults-file)
and when you later start the server.
The new default config file was created as /usr/local/mysql/my-new.cnf,
please compare it with your file and take the changes you need.

WARNING: Default config file /etc/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
–defaults-file argument to mysqld_safe when starting the server

WARNING: Default config file /etc/mysql/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
–defaults-file argument to mysqld_safe when starting the server

sudo ./mysqld_safe –user=mysql –skip-grant-tables –skip-networking &

socket = /var/run/mysqld/mysql.sock

最后推荐一下,个人自营api数据平台,有各种各样数据,欢迎访问。www.yunshuda.cn 云数达

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值