2

我是 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

然后,当我执行以下命令时,我遇到了几个错误。

$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/local/mysql//bin/mysql -u root mysql',我发现

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

/tmp/mysql.sock又不/var/run/mysqld/mysqld.sock存在。我检查了它...

请提出一些建议来解决这个问题。

甚至mysqld服务都没有启动..

4

1 回答 1

1

“连接:连接被拒绝”意味着服务器没有在预期的地方监听;我知道迟到一年的答案可能有点太晚了,但应该从发行版或官方构建的内容开始,而不是首先从一个相当复杂的产品的 RC 的自制源构建开始。

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

于 2013-04-01T15:08:23.620 回答