2012-01-04 49 views
2

我是新與MySQL,請幫助我。 首先安裝MySQL 5.5.7-RC我用這個命令 - >如何使mysql_install_db工作?

  1. sudo ./configure --prefix=/usr/local/mysql --with-plugin-partition --with-tcp-port=3308 --with-unix-socket-path=/tmp/mysql1.sock --with-debug
  2. $sudo make
  3. $sudo make install

然後當我執行以下命令我得到幾個錯誤。

$sudo ./mysql_install_db --datadir=/usr/local/mysql/data --basedir=/usr/local/mysql/ --user=mysql 

錯誤:::

Installing MySQL system tables... 

connect: Connection refused 

Installation of system tables failed! Examine the logs in 
/usr/local/mysql/data for more information. 

You can try to start the mysqld daemon with: 
    shell> /usr/local/mysql//bin/mysqld --skip-grant & 
and use the command line tool /usr/local/mysql//bin/mysql 
to connect to the mysql database and look at the grant tables: 
    shell> /usr/local/mysql//bin/mysql -u root mysql 
    mysql> show tables 
Try 'mysqld --help' if you have problems with paths. Using --log 
gives you a log in /usr/local/mysql/data that may be helpful. 
Please consult the MySQL manual section 
'Problems running mysql_install_db', and the manual section that 
describes problems on your OS. Another information source are the 
MySQL email archives available at http://lists.mysql.com/. 
Please check all of the above before mailing us! And remember, if 
you do mail us, you MUST use the /usr/local/mysql//scripts/mysqlbug script! 

然後我嘗試 '在/ usr /本地/ MySQL的//斌/ MySQL的-u MySQL的root',我發現

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

/tmp/mysql.sock/var/run/mysqld/mysqld.sock不存在。我檢查......

請給一些建議,以解決這個問題。

即使mysqld服務沒有被啓動..

+0

只是一個瘋狂的想法:檢查在/ usr /本地/ mysql /下數據的日誌我做先生,但是有更多的信息 – 2012-01-04 09:06:27

+0

沒有.. – 2012-01-04 09:08:44

回答

1

「連接:連接被拒絕」指的是服務器的不聽它的預期來;據我所知,今年的答案下旬可能會有點晚,但應該用什麼分佈提供或正式建立並在第一個比較複雜的產品的RC的自制源建設啓動地點。

也許那些達不到這個問題會找到接受的答案到一個有用:bash:scripts/mysql_install_db: No such file or directory