• <legend id='cKzeO'><style id='cKzeO'><dir id='cKzeO'><q id='cKzeO'></q></dir></style></legend>
      <bdo id='cKzeO'></bdo><ul id='cKzeO'></ul>

      1. <small id='cKzeO'></small><noframes id='cKzeO'>

      2. <tfoot id='cKzeO'></tfoot>
        <i id='cKzeO'><tr id='cKzeO'><dt id='cKzeO'><q id='cKzeO'><span id='cKzeO'><b id='cKzeO'><form id='cKzeO'><ins id='cKzeO'></ins><ul id='cKzeO'></ul><sub id='cKzeO'></sub></form><legend id='cKzeO'></legend><bdo id='cKzeO'><pre id='cKzeO'><center id='cKzeO'></center></pre></bdo></b><th id='cKzeO'></th></span></q></dt></tr></i><div id='cKzeO'><tfoot id='cKzeO'></tfoot><dl id='cKzeO'><fieldset id='cKzeO'></fieldset></dl></div>
      3. 无法通过 socket '/tmp/mysql.sock' 连接到本地 MySQL 服务器 (2)

        时间:2024-04-16
      4. <small id='CQd8A'></small><noframes id='CQd8A'>

            <tbody id='CQd8A'></tbody>
            <bdo id='CQd8A'></bdo><ul id='CQd8A'></ul>
            <legend id='CQd8A'><style id='CQd8A'><dir id='CQd8A'><q id='CQd8A'></q></dir></style></legend>

              • <i id='CQd8A'><tr id='CQd8A'><dt id='CQd8A'><q id='CQd8A'><span id='CQd8A'><b id='CQd8A'><form id='CQd8A'><ins id='CQd8A'></ins><ul id='CQd8A'></ul><sub id='CQd8A'></sub></form><legend id='CQd8A'></legend><bdo id='CQd8A'><pre id='CQd8A'><center id='CQd8A'></center></pre></bdo></b><th id='CQd8A'></th></span></q></dt></tr></i><div id='CQd8A'><tfoot id='CQd8A'></tfoot><dl id='CQd8A'><fieldset id='CQd8A'></fieldset></dl></div>

                  <tfoot id='CQd8A'></tfoot>
                1. 本文介绍了无法通过 socket '/tmp/mysql.sock' 连接到本地 MySQL 服务器 (2)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试在我的终端上运行 mysql 客户端.我已经安装了最新的 mysql gem.

                  I am trying to run mysql client on my terminal. I have installed the latest mysql gem.

                     ~ git:(master)  ruby -v
                      ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
                        ~ git:(master)  rails -v
                      Rails 2.3.14
                        ~ git:(master)  which mysql
                      mysql: aliased to nocorrect mysql
                        ~ git:(master)  which ruby
                      /usr/bin/ruby
                        ~ git:(master)  which rails
                      /usr/bin/rails
                        ~ git:(master)  gem list
                  
                  *** LOCAL GEMS ***
                  
                  actionmailer (2.3.14)
                  actionpack (2.3.14)
                  activerecord (2.3.14)
                  activeresource (2.3.14)
                  activesupport (2.3.14)
                  builder (2.1.2)
                  bundler (1.0.21)
                  capistrano (2.9.0)
                  capybara (0.3.9)
                  cgi_multipart_eof_fix (2.5.0)
                  childprocess (0.2.2)
                  columnize (0.3.4, 0.3.3)
                  cucumber (0.9.4)
                  cucumber-rails (0.3.2)
                  culerity (0.2.15)
                  daemons (1.1.4)
                  database_cleaner (0.6.7)
                  diff-lcs (1.1.3)
                  expertiza-authlogic (2.1.6.1)
                  fastercsv (1.5.4)
                  fastthread (1.0.7)
                  ffi (1.0.10, 1.0.9)
                  gdata (1.1.2)
                  gem_plugin (0.2.3)
                  gherkin (2.2.9)
                  highline (1.6.2)
                  hoptoad_notifier (2.4.11)
                  json (1.4.6)
                  json_pure (1.6.1)
                  linecache (0.46)
                  mime-types (1.16)
                  mongrel (1.1.5)
                  mysql (2.8.1)
                  mysql2 (0.3.7)
                  net-scp (1.0.4)
                  net-sftp (2.0.5)
                  net-ssh (2.2.1)
                  net-ssh-gateway (1.1.0)
                  nokogiri (1.5.0)
                  rack (1.1.2)
                  rack-test (0.6.1)
                  rails (2.3.14)
                  rake (0.9.2)
                  rbx-require-relative (0.0.5)
                  rdoc (3.11)
                  RedCloth (4.2.8)
                  rgl (0.4.0)
                  ruby-debug (0.10.4)
                  ruby-debug-base (0.10.4)
                  rubyzip (0.9.4)
                  selenium-webdriver (2.8.0, 2.7.0)
                  stream (0.5)
                  term-ansicolor (1.0.7, 1.0.6)
                  
                    expertiza git:(master)  sudo su
                  Password:
                  sh-3.2# mysql -u root -p
                  Enter password: 
                  ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
                  sh-3.2# 
                  

                  我无法摆脱上述错误.我在 /Users/HPV/expertiza/tmp/sockets 中创建了一个 mysql.sock 文件.在我写的文件中,mysql.default_socket =/expertiza/tmp/sockets/mysql.sock.

                  I am not able to get rid of the above error. I have created a mysql.sock file in /Users/HPV/expertiza/tmp/sockets. In the file I have written mysql.default_socket =/expertiza/tmp/sockets/mysql.sock.

                  我做错了什么?

                  谢谢!

                  推荐答案

                  您需要按照说明安装并启动服务器.

                  You need to follow the directions to install and start the server.

                  命令因您安装 MySQL 的方式而异.先试试这个:

                  The command varies depending on how you installed MySQL. Try this first:

                  sudo/Library/StartupItems/MySQLCOM/MySQLCOM start

                  sudo /Library/StartupItems/MySQLCOM/MySQLCOM start

                  如果失败:

                  cd/usr/local/mysql
                  须藤./bin/mysqld_safe
                  (如有必要,请输入您的密码)
                  (按 Control-Z)
                  背景

                  cd /usr/local/mysql
                  sudo ./bin/mysqld_safe
                  (Enter your password, if necessary)
                  (Press Control-Z)
                  bg

                  这篇关于无法通过 socket '/tmp/mysql.sock' 连接到本地 MySQL 服务器 (2)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:用户“root"@“localhost"的访问被拒绝 - 终端,Mac 下一篇:MacOSX:启动时自动启动 mysql

                  相关文章

                  <tfoot id='0jeow'></tfoot>
                2. <i id='0jeow'><tr id='0jeow'><dt id='0jeow'><q id='0jeow'><span id='0jeow'><b id='0jeow'><form id='0jeow'><ins id='0jeow'></ins><ul id='0jeow'></ul><sub id='0jeow'></sub></form><legend id='0jeow'></legend><bdo id='0jeow'><pre id='0jeow'><center id='0jeow'></center></pre></bdo></b><th id='0jeow'></th></span></q></dt></tr></i><div id='0jeow'><tfoot id='0jeow'></tfoot><dl id='0jeow'><fieldset id='0jeow'></fieldset></dl></div>

                  <small id='0jeow'></small><noframes id='0jeow'>

                    <bdo id='0jeow'></bdo><ul id='0jeow'></ul>

                    <legend id='0jeow'><style id='0jeow'><dir id='0jeow'><q id='0jeow'></q></dir></style></legend>