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」を試してみたところ、見つかりました

エラー 2002 (HY000): ソケット '/tmp/mysql.sock' を介してローカル MySQL サーバーに接続できません (2)

しかし/tmp/mysql.sock/var/run/mysqld/mysqld.sock存在しません。調べた...

この問題を克服するための提案をお願いします。

サービスさえmysqld開始されていません..

4

1 に答える 1

1

「接続: 接続が拒否されました」は、サーバーが予期された場所でリッスンしていないことを意味します。1年遅れの答えは少し遅すぎるかもしれないことは理解していますが、そもそも非常に複雑な製品のRCの自作ソースビルドではなく、ディストリビューションが提供するものまたは公式ビルドから始めるべきです.

おそらく、この質問をした人は、その質問に対する受け入れられた答えが役立つと思うでしょう: bash:scripts/mysql_install_db: No such file or directory

于 2013-04-01T15:08:23.620 に答える