开发者社区> 问答> 正文

linux虚拟机上安装mysql的时候报错

在执行scripts/mysql_install_db --user=mysql的时候出错,
FATAL ERROR: Neither host 'localhost.localdomain' nor 'localhost' could be looked up with
我的etc/hosts文件也有localhost,并且可以ping通,请问该怎么解决呀?
screenshot

展开
收起
云栖技术 2016-06-06 09:19:27 2212 0
1 条回答
写回答
取消 提交回答
  • 社区爱好者,专为云栖社区服务!
     jpai@jpai-laptop:mysql-5.1.50-linux-i686-glibc23$ scripts/mysql_install_db --basedir=.
    
    (Remember that we are running this command from the  MYSQL_DOWNLOAD_HOME, so the relative path "." works fine for the basedir).
    
    2019-07-17 19:27:33
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
搭建电商项目架构连接MySQL 立即下载
搭建4层电商项目架构,实战连接MySQL 立即下载
PolarDB MySQL引擎重磅功能及产品能力盛大发布 立即下载