亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 42999 | 回復(fù): 0
打印 上一主題 下一主題

讓人崩潰的bug: scripts/mysql_install_db: ./bin/my_print_defaults: not found [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2014-11-05 13:53 |只看該作者 |倒序?yàn)g覽
本帖最后由 starive 于 2014-11-05 14:25 編輯

本人下載了MySQL cluster 7.3.7 (下載地址:http://dev.mysql.com/downloads/cluster/) 二進(jìn)制版本。本人參考博客:http://blog.itpub.net/26230597/viewspace-1087713/ 進(jìn)行安裝,目前已經(jīng)在管理節(jié)點(diǎn)和數(shù)據(jù)節(jié)點(diǎn)安裝好了Cluster。但是在 SQL節(jié)點(diǎn)上安裝Cluster就出現(xiàn)了問題。


SQL 節(jié)點(diǎn)安裝步驟如下:

解壓文件
shell>tar -zxvf mysql-cluster-gpl-7.3.7-linux-glibc2.5-i686.tar.gz



拷貝安裝文件
shell>mv /home/David/cluster/mysql-cluster-gpl-7.3.7-linux2.6-x86_64  /usr/local/mysql


添加mysql用戶
shell>groupadd  mysql
shell>useradd -g mysql mysql


添加權(quán)限
shell>chown -R mysql:mysql /usr/local/mysql


拷貝配置文件
shell>cp /usr/local/mysql/support-files/my-default.cnf  /etc/my.cnf



初始化數(shù)據(jù)庫
shell>cd /usr/local/mysql
shell>scripts/mysql_install_db --user=mysql

報錯:
sh: 1: ./bin/my_print_defaults: not found
FATAL ERROR: Neither host 'ubuntu' nor 'localhost' could be looked up with
./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


本人采用了如下方法來解決:
解決方法1
查看 /etc/hosts, 其內(nèi)容如下:
127.0.0.1 localhost
127.0.1.1 ubuntu

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

127.0.0.1 localhost,localhost.localdomain
172.3.200.159 localhost,localhost.locqaldomain

完全符合網(wǎng)上所說“要添加 127.0.0.1 localhost到/etc/hosts文件中“。最后一行”172.3.200.159“是本人的ip地址。



解決方法2
修改 ~/.bashrc文件的內(nèi)容:

vi ~/.bashrc
export PATH=/usr/local/mysql/binPATH
source ~/.bashrc
重新啟動機(jī)器,重新執(zhí)行命令:scripts/mysql_install_db --user=mysql  
出現(xiàn)了如下錯誤:
FATAL ERROR: Could not find ./bin/my_print_defaults
If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.

又參考網(wǎng)頁: http://blog.sina.com.cn/s/blog_546cc4350101g1pj.html
執(zhí)行命令:/usr/local/mysql/scripts/mysql_install_db –user=mysql –basedir=/usr/local/mysql –datadir=/usr/local/mysql/data &

又出現(xiàn)error:  
root@ubuntu:/usr/local/mysql/bin# /usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data &
[1] 2264
root@ubuntu:/usr/local/mysql/bin# sh: 1: /usr/local/mysql/bin/my_print_defaults: not found
FATAL ERROR: Neither host 'ubuntu' nor 'localhost' could be looked up with
/usr/local/mysql/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


采用以上兩種方法,仍然無法解決問題,到底該如何解決了???

本人仔細(xì)看了博客http://blog.itpub.net/26230597/viewspace-1087713/的安裝方法,和博客的方法只有以下兩個區(qū)別:
區(qū)別:
博客是 mysql-cluster-gpl-7.2.4-linux2.6-x86_64.tar.gz
我的是 mysql-cluster-gpl-7.3.7-linux-glibc2.5-i686.tar.gz
一個64位,一個32位
博客的是 linux2.6, 我的是linux-glibc2.5


其實(shí),這個問題在這臺機(jī)器(后面簡稱主機(jī)C)上不是第一次出現(xiàn)了。因?yàn)槲乙罱╩ysql集群,所以首先在 三臺機(jī)器上面都安裝上了mysql。不過安裝環(huán)境有區(qū)別: 主機(jī)A的環(huán)境是:Win7下的VirtualBox + Ubuntu + MySQL, 主機(jī)B的環(huán)境是:Win7下的VirtualBox + Ubuntu + MySQL, 主機(jī)C的環(huán)境是:Ubuntu系統(tǒng) + MySQL。主機(jī)C的系統(tǒng)直接在機(jī)器上面安裝的,不是虛擬環(huán)境,安裝方法:wubi安裝。

最開始在三臺主機(jī)分別安裝MySQL時,主機(jī)A和主機(jī)B都能順利安裝,但是主機(jī)C上面安裝有問題,出現(xiàn)的問題跟現(xiàn)在搭建cluster的問題一模一樣(詳見我發(fā)布的帖子: http://www.itpub.net/thread-1894039-1-1.html

為什么每次在主機(jī)C上面執(zhí)行 scripts/mysql_install_db --user=mysql, 都會出現(xiàn)這種錯誤了,難道是因?yàn)槲抑苯影惭bUbuntu的原因嗎,還是Wubi安裝帶來的bug??? 這個難題都困惱我半個月了,在stackoverflow,itpub和csdn上面都沒有人能解答???



請告訴幫忙解答,謝謝!
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP