如何使mysql_install_db工作?

时间:2012-01-04 08:57:05

标签: mysql mysql-5.5

我是MySql的新手,请帮帮我。 首先安装MySql 5.5.7-rc我使用了这个命令 - >

  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
  4. 然后,当我执行以下命令时,我遇到了几个错误。

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

    ERROR :::

    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 / local / mysql // bin / mysql -u root mysql'并且我找到了

      

    ERROR 2002(HY000):无法通过socket'/tmp/mysql.sock'连接到本地MySQL服务器(2)

    /tmp/mysql.sock/var/run/mysqld/mysqld.sock不存在。我查了一下......

    请提出一些建议来克服这个问题。

    即使mysqld服务尚未启动..

1 个答案:

答案 0 :(得分:1)

“connect:Connection refused”意味着服务器没有收听预期的位置;我明白,一年后的答案可能有点太晚,但是应该从分发提供的内容或官方构建开始,自制的源代码构建首先是一个相当复杂的产品的RC。

也许那些遇到这个问题的人会找到有用的答案:bash:scripts/mysql_install_db: No such file or directory