Номер ошибки 2002

Использование приложения «Сбербанк Онлайн» – один из самых удобных способов взаимодействия с банковскими продуктами и услугами. Однако, пользователи приложения могут столкнуться с неприятной проблемой – появлением кода ошибки 2002.

Эта ошибка может появиться из-за различных причин, таких как проблемы с Интернет-подключением, технические неполадки в приложении или другие причины.

Многие пользователи задаются вопросом, как исправить данную проблему. В этой статье мы рассмотрим несколько возможных решений проблемы с кодом ошибки 2002 в «Сбербанк Онлайн», которые можно проверять онлайн и которые могут помочь в решении данной проблемы.

В этой статье:

  1. О коде ошибки 2002 в «Сбербанк Онлайн»
  2. Причина появления ошибки 2002
  3. Как исправлять ошибку 2002?
  4. Можно ли избежать ошибки 2002?
  5. Что это за ошибка?
  6. Как исправить ошибку 2002 в «Сбербанк Онлайн»?

О коде ошибки 2002 в «Сбербанк Онлайн»

Причина появления ошибки 2002

Код ошибки 2002 – это ошибка, которая часто возникает при использовании онлайн-приложения Сбербанка. Ее причиной может быть недоступность интернет-соединения, проблемы с настройками сетевого адаптера или блокировка порта SSL-шифрования.

Как исправлять ошибку 2002?

Существует несколько способов исправления ошибки 2002:

  • Проверьте соединение с интернетом и убедитесь, что оно работает без проблем.
  • Проверьте настройки сетевого адаптера на наличие ошибок.
  • Убедитесь, что порт SSL-шифрования не заблокирован вашей антивирусной программой или брандмауэром.
  • Попробуйте использовать онлайн-приложение в другом браузере или на другом устройстве.

Можно ли избежать ошибки 2002?

Чтобы избежать ошибки 2002, следует проверять соединение с интернетом и настройки сетевого адаптера, использовать надежный браузер и убедиться, что порт SSL-шифрования не заблокирован. Также стоит периодически проверять приложение на наличие обновлений и устанавливать их, если они доступны.

Что это за ошибка?

Ошибка 2002 в приложении «Сбербанк Онлайн» – это проблема, которая может возникнуть при использовании приложения на мобильном устройстве или компьютере. Появление данной ошибки говорит о том, что возникли проблемы с подключением к интернету или с сервером банка.

Если вы испытываете данную ошибку, то сначала стоит проверить своё интернет-соединение. Если оно работает исправно, то проблема может быть внутри приложения. Получается, что ошибку можно исправлять как самостоятельно, так и с помощью технической поддержки Сбербанка.

  • Если вы хотите исправить ошибку самостоятельно, то можно попробовать выполнить перезагрузку приложения или устройства, а также проверить наличие обновлений приложения.
  • Если проблема не исчезает, то следует обратиться в службу поддержки Сбербанка. Специалисты помогут проанализировать проблему и решить её максимально быстро.

В любом случае, если вы столкнулись с ошибкой 2002 в приложении «Сбербанк Онлайн», не стоит паниковать. Проблема решаема, и можно рассчитывать на оперативное её устранение.

Как исправить ошибку 2002 в «Сбербанк Онлайн»?

Код ошибки 2002 может появиться в «Сбербанк Онлайн» приложении из-за разных причин. Однако, чаще всего, это связано с проблемами с интернет-соединением.

Если вы столкнулись с данной ошибкой, то сначала проверьте свой интернет на наличие проблем: низкий уровень сигнала, сбои в соединении, временная недоступность интернета на устройстве и т.д. Можно использовать другие приложения или сайты, чтобы убедиться в стабильности интернет-соединения.

Если проблема в интернет-соединении не подтверждается, то следующим шагом можно проверить настройки приложения. Возможно, проблема возникла из-за некорректных настроек или неправильной установки «Сбербанк Онлайн».

Если все настройки на месте, а проблема дальше остается, то стоит обратиться в службу поддержки Сбербанка. Они смогут помочь в устранении данной ошибки и предоставить более подробную информацию о ее причинах и способах решения.

10 апреля, 2019 12:27 пп
6 562 views
| Комментариев нет

MariaDB, mySQL

Этот мануал является частью серии статей по устранению неполадок и диагностике MySQL. Здесь мы рассмотрим некоторые общие проблемы, с которыми сталкиваются многие пользователи MySQL, и предоставим рекомендации по устранению конкретных ошибок. Также здесь вы найдете ссылки на другие мануалы и официальную документацию по MySQL, которые могут быть полезны в некоторых случаях.

Читайте также:

  • Доступ к логам ошибок MySQL
  • Устранение неполадок в запросах MySQL
  • Управление удаленным доступом к MySQL
  • Устранение сбоев в MySQL
  • Восстановление поврежденных таблиц MySQL

MySQL управляет соединениями с сервером БД через сокет-файл, это специальный файл, который облегчает связь между различными процессами. Сокет-файл сервера MySQL называется mysqld.sock, в системах Ubuntu он обычно хранится в каталоге /var/run/mysqld/. Этот файл создается сервисом MySQL автоматически.

Иногда изменения в системе или в конфигурации MySQL приводят к тому, что MySQL не может прочитать сокет-файл. Из-за этого у вас могут быть проблемы с доступом к вашим базам данных. Наиболее распространенная ошибка сокета выглядит следующим образом:

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

Она может возникнуть по нескольким причинам. Существует несколько путей ее устранения.

Одна из основных причин этой ошибки заключается в том, что сервис MySQL остановлен или не запустился с самого начала. А это означает, что сервис просто не смог создать сокет-файл. Чтобы выяснить, является ли это причиной возникновения ошибки в вашем случае, попробуйте запустить сервис через systemctl:

sudo systemctl start mysql

Затем попробуйте снова получить доступ к командной строке MySQL. Если вы все еще получаете ошибку сокета, проверьте расположение, где ваша установка MySQL ищет сокет-файл. Эта информация есть в файле mysqld.cnf:

sudo nano /etc/mysql/mysql.conf.d/mysql.cnf

Найдите параметр socket в разделе [mysqld]:

. . .
[mysqld]
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
. . .

Закройте файл. Затем убедитесь, что файл mysqld.sock существует, запустив команду ls в каталоге, где MySQL ищет этот файл:

ls -a /var/run/mysqld/

Если файл существует в этом каталоге, вы увидите его в выводе команды:

.  ..  mysqld.pid  mysqld.sock  mysqld.sock.lock

Если же файл не существует, возможно, причина в том, что MySQL пытается его создать, но не имеет для этого соответствующих прав. Вы можете передать все права на файл пользователю и группе mysql:

sudo chown mysql:mysql /var/run/mysqld/

После этого убедитесь, что у пользователя mysql есть необходимые права на каталог. Привилегии 775 подойдут в большинстве случаев:

sudo chmod -R 755 /var/run/mysqld/

Перезапустите MySQL, чтобы снова попытаться создать сокет-файл.

sudo systemctl restart mysql

Затем попробуйте получить доступ к командной строке MySQL еще раз. Если вы все еще сталкиваетесь с ошибкой сокета, вероятно, в вашем экземпляре MySQL существует более глубокая проблема. В этом случае вы должны просмотреть лог ошибок и поискать там какие-либо подсказки.

Читайте также: Устранение неполадок в MySQL

Этот мануал является частью серии статей по устранению неполадок и диагностике MySQL. Здесь мы рассмотрим некоторые общие проблемы, с которыми сталкиваются многие пользователи MySQL, и предоставим рекомендации по устранению конкретных ошибок. Также здесь вы найдете ссылки на другие мануалы и официальную документацию по MySQL, которые могут быть полезны в некоторых случаях.

Читайте также:

  • Доступ к логам ошибок MySQL
  • Устранение неполадок в запросах MySQL
  • Управление удаленным доступом к MySQL
  • Устранение сбоев в MySQL
  • Восстановление поврежденных таблиц MySQL

MySQL управляет соединениями с сервером БД через сокет-файл, это специальный файл, который облегчает связь между различными процессами. Сокет-файл сервера MySQL называется mysqld.sock, в системах Ubuntu он обычно хранится в каталоге /var/run/mysqld/. Этот файл создается сервисом MySQL автоматически.

Иногда изменения в системе или в конфигурации MySQL приводят к тому, что MySQL не может прочитать сокет-файл. Из-за этого у вас могут быть проблемы с доступом к вашим базам данных. Наиболее распространенная ошибка сокета выглядит следующим образом:

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

Она может возникнуть по нескольким причинам. Существует несколько путей ее устранения.

Одна из основных причин этой ошибки заключается в том, что сервис MySQL остановлен или не запустился с самого начала. А это означает, что сервис просто не смог создать сокет-файл. Чтобы выяснить, является ли это причиной возникновения ошибки в вашем случае, попробуйте запустить сервис через systemctl:

sudo systemctl start mysql

Затем попробуйте снова получить доступ к командной строке MySQL. Если вы все еще получаете ошибку сокета, проверьте расположение, где ваша установка MySQL ищет сокет-файл. Эта информация есть в файле mysqld.cnf:

sudo nano /etc/mysql/mysql.conf.d/mysql.cnf

Найдите параметр socket в разделе [mysqld]:

. . .
[mysqld]
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
. . .

Закройте файл. Затем убедитесь, что файл mysqld.sock существует, запустив команду ls в каталоге, где MySQL ищет этот файл:

ls -a /var/run/mysqld/

Если файл существует в этом каталоге, вы увидите его в выводе команды:

.  ..  mysqld.pid  mysqld.sock  mysqld.sock.lock

Если же файл не существует, возможно, причина в том, что MySQL пытается его создать, но не имеет для этого соответствующих прав. Вы можете передать все права на файл пользователю и группе mysql:

sudo chown mysql:mysql /var/run/mysqld/

После этого убедитесь, что у пользователя mysql есть необходимые права на каталог. Привилегии 775 подойдут в большинстве случаев:

sudo chmod -R 755 /var/run/mysqld/

Перезапустите MySQL, чтобы снова попытаться создать сокет-файл.

sudo systemctl restart mysql

Затем попробуйте получить доступ к командной строке MySQL еще раз. Если вы все еще сталкиваетесь с ошибкой сокета, вероятно, в вашем экземпляре MySQL существует более глубокая проблема. В этом случае вы должны просмотреть лог ошибок и поискать там какие-либо подсказки.

Читайте также: Устранение неполадок в MySQL

Tags: MySQL

I’m getting this error

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

even though I have managed to start mysql via command line in ubuntu

mysql stop/waiting
mysql start/running, process 17691

However when attempting to access the site I get a database connection error as well as the above error when trying to access mysql via mysql -u root -p

I checked my error logs and I saw this

    131029 12:53:34 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be remo$
    131029 12:53:34 [Note] Plugin 'FEDERATED' is disabled.
    131029 12:53:34 InnoDB: The InnoDB memory heap is disabled
    131029 12:53:34 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    131029 12:53:34 InnoDB: Compressed tables use zlib 1.2.3.4
    131029 12:53:34 InnoDB: Initializing buffer pool, size = 26.0G
    131029 12:53:36 InnoDB: Completed initialization of buffer pool
    131029 12:53:36 InnoDB: highest supported file format is Barracuda.
    131029 12:53:38  InnoDB: Waiting for the background threads to start
    131029 12:53:39 InnoDB: 5.5.34 started; log sequence number 5146431500
    131029 12:53:39 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
    131029 12:53:39 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
    131029 12:53:39 [Note] Server socket created on IP: '0.0.0.0'.
    131029 12:53:39 [Note] Event Scheduler: Loaded 0 events
    131029 12:53:39 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.5.34-0ubuntu0.12.04.1-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)

It’s the first time I see this error and I’m not sure how to solve this issue, please help me out a bit here.

Thanks

UPDATE

Okay I tried glglgl’s solution and after a restart, I get the following in the error log:

    131029 13:17:36 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be remo$
    131029 13:17:36 [Note] Plugin 'FEDERATED' is disabled.
    131029 13:17:36 InnoDB: The InnoDB memory heap is disabled
    131029 13:17:36 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    131029 13:17:36 InnoDB: Compressed tables use zlib 1.2.3.4
    131029 13:17:36 InnoDB: Initializing buffer pool, size = 26.0G
    131029 13:17:38 InnoDB: Completed initialization of buffer pool
    131029 13:17:38 InnoDB: highest supported file format is Barracuda.
    131029 13:17:40  InnoDB: Waiting for the background threads to start
    131029 13:17:41 InnoDB: 5.5.34 started; log sequence number 5146431500
    131029 13:17:41 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
    131029 13:17:41 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
    131029 13:17:41 [Note] Server socket created on IP: '127.0.0.1'.  
    131029 13:17:41 [Note] Event Scheduler: Loaded 0 events
    131029 13:17:41 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.5.34-0ubuntu0.12.04.1-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)

asked Oct 29, 2013 at 12:58

user2028856's user avatar

user2028856user2028856

3,0638 gold badges44 silver badges71 bronze badges

6

My problem was solved checking if the process was running on Ubuntu 12.04

ps ax | grep mysql

Then the answer was that it wasn’t running, so I did

sudo service mysql start

Or try

sudo /etc/init.d/mysql start

answered Dec 14, 2013 at 13:37

Wellington Lorindo's user avatar

5

Firstly, please confirm mysql-server is installed. I have the same error when mysql-server is installed but corrupted somehow. I do the trick by uninstall mysql completely and reinstall it.

sudo apt-get remove --purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get install mysql-server mysql-client

answered Apr 9, 2016 at 10:44

johnny's user avatar

johnnyjohnny

5,0771 gold badge16 silver badges9 bronze badges

2

This took me ages to figure out but could you try the same —

1 — Update and Upgrade

sudo apt-get update
sudo apt-get upgrade

2 — Purge MySQL Server and Client (if installed).

sudo apt-get purge mysql-server mysql-client

3 — Install MySQL Server and Client fresh

sudo apt-get install mysql-server mysql-client

4 — Test MySQL

mysql -u root -p
> enter root password

*** should get socket not found in /var/run/mysqld/mysql.sock

4 — Configure mysqld.cnf with nano of vi

sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf

Change bind-address from 127.0.0.1 to localhost

bind-address            = localhost

** Write and Exit

5 — Restart MySQL

sudo /etc/init.d/mysql restart

6 — check mysql

mysql -u root -p
> enter root password

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.13-0ubuntu0.16.04.2 (Ubuntu)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

You should get in to mysql cli now.

Hope this helps

Code.Ph0y

answered Sep 10, 2016 at 4:56

Code Ph0y's user avatar

Code Ph0yCode Ph0y

1731 silver badge5 bronze badges

I had the same problem when i installed xampp on my system. The mysql server looks for /var/run/mysqld/mysqld.sock but the mysql.sock file was in xampp folder so i used

 find / -name '*.sock'

to find the mysql.sock file and then used

ln -s <the file location> /var/run/mysqld/mysqld.sock

to get a link for the *.sock file then tried mysql and it ran without error.
Hope this could solve yours.

Remember to create the directory if it does not exists.

answered Oct 30, 2013 at 9:15

krg265's user avatar

krg265krg265

3831 silver badge10 bronze badges

1

The client should be set consistent with server setting.

[client]
port        = 3306
socket      = /var/run/mysqld/mysqld.sock

[mysqld]
user        = mysql
pid-file    = /var/run/mysqld/mysqld.pid
socket      = /var/run/mysqld/mysqld.sock
port        = 3306

answered Dec 25, 2013 at 2:39

feuyeux's user avatar

feuyeuxfeuyeux

1,1581 gold badge9 silver badges26 bronze badges

3

You don’t need to reinstall MySQL server
I was facing the same issue but I have resolved the issue by running these commands.

  1. ps -A|grep mysql
  2. sudo pkill mysql
  3. ps -A|grep mysqld
  4. sudo pkill mysqld
  5. sudo service mysql restart
  6. sudo mysql -u root -p

answered Jan 10, 2019 at 9:27

Chudamani Sanju's user avatar

2

recently i have faced with this error in my mysql
ERROR 2002 (HY000):

Can’t connect to local MySQL server through socket

‘/var/lib/mysql/mysql.sock’ (111)

because i forget to start my mariadb.
just type this command on ur terminal.

systemctl start mariadb.service

Community's user avatar

answered Nov 30, 2015 at 4:24

Aung Kyaw Nyunt's user avatar

0

In the linux terminal, I run the following steps and they helped me out

1.First of all list all the mysql packages installed

  sudo dpkg -l | grep mysql

2.Delete the listed packages with the listed command

  sudo apt-get --purge autoremove <package name>

3.Reinstall mysql server

  sudo apt-get install mysql-server

This worked for me, Hope this works for you aswell.

Alternatively Try

sudo apt-get remove --purge mysql-\

then reinstall with

sudo apt-get install mysql-server mysql-client

answered Jan 2, 2018 at 12:02

Maurice Elagu's user avatar

Maurice ElaguMaurice Elagu

7641 gold badge10 silver badges20 bronze badges

I deleted everything connected to mysql with

sudo apt-get remove —purge —auto-remove mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-5.7

sudo rm -r /etc/mysql* /var/lib/mysql* /var/log/mysql*

and then reinstalled it again with

sudo apt-get update

sudo apt-get install mysql-server

and then started it with

mysql -u root -p

followed by the password

answered May 30, 2018 at 14:02

schlusie's user avatar

schlusieschlusie

1,9073 gold badges20 silver badges26 bronze badges

0

I have follow Wellington Lorindo posting.
And My problem was solved.

Steps
1. run in terminal

ps ax | grep mysql

Result was

11200 ? Ssl 0:01 /usr/sbin/mysqld

11514 pts/0 S+ 0:00 grep mysql

Steps
2. Again type this

sudo service mysql start

And problem solved.

Thanks Wellington Lorindo

answered Aug 23, 2014 at 8:27

Sachin's user avatar

0

You may be missing mysql-server. install it using

sudo apt-get install mysql-server

answered Sep 2, 2015 at 9:28

Ranju R's user avatar

Ranju RRanju R

2,41721 silver badges16 bronze badges

1

This is an old tread with different solution proposed, but none of them worked for me. I’m adding this answer in the hope it will help somebody who struggled as me for some time.

I’ve checked all the existing answers and all the existing solution, but for me the issue was incorrect user permission on var/run/mysql folder.

I’ve checked the user permission on that folder and it was set to root. Once i changed to mysql:mysql the problem has gone.

So enter into /var/run/mysqld and change the user permission to:

chown -R mysql:mysql .

answered Nov 27, 2016 at 15:18

Endre Simo's user avatar

Endre SimoEndre Simo

11.4k2 gold badges40 silver badges49 bronze badges

0

I had the problem.

This process worked for me:

Ensure that during remove process you choose No to deleting database.

sudo apt-get remove --purge mysql*

sudo apt-get autoremove

sudo apt-get autoclean

sudo apt-get install mysql-server mysql-client

Renil Babu's user avatar

Renil Babu

2,1181 gold badge20 silver badges29 bronze badges

answered Sep 7, 2017 at 15:16

Samuel's user avatar

I had the same problem after altering my.cnf. I resolved this problem next steps.

First : to find the location of error.log, look at ‘my.conf’.

Second : I looked up error.log, I found next massages,

«unknown variable ‘default-……’ »
…..
» mysqld_safe Starting mysqld darmon with from /var/lib/mysql «

Third : I reset my.conf to the default, then restart, this problem was resolved.

I hope this helps.

answered Mar 3, 2014 at 3:43

takechanman's user avatar

The same error occured with my system as well. I had to remove mysql-server and reinstall it. Not other way around. Try running these commands it it works:

  1. sudo apt-get purge mysql-server
  2. sudo apt-get autoremove
  3. sudo apt-get install mysql-server

Serjik's user avatar

Serjik

10.6k8 gold badges61 silver badges70 bronze badges

answered Jan 7, 2016 at 4:53

user3898336's user avatar

0

this worked for me

sudo /etc/init.d/mysql start

first i tried this, but i dont understand why it doesn’t work this way

sudo service mysql start

answered Aug 27, 2016 at 16:10

aimme's user avatar

aimmeaimme

6,4057 gold badges48 silver badges65 bronze badges

On Debian this was a bind problem for me so changing bind-address from localhost to 0.0.0.0 helped.

vim /etc/mysql/my.cnf 

bind-address = 0.0.0.0

answered Jul 12, 2017 at 6:51

Achu's user avatar

AchuAchu

8291 gold badge8 silver badges14 bronze badges

1

If you look close, you’ll see the difference:

  • The server listens on /var/run/mysqld/mysqld.sock
  • The client tries to connect to /var/run/mysqld/mysql.sock

You’ll have to adjust the one or the other.

answered Oct 29, 2013 at 13:04

glglgl's user avatar

glglglglglgl

89.2k13 gold badges149 silver badges217 bronze badges

4

I also met this problem.
mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

Then I find the reason is my selinux is enforcing, I disable it then restart mysqld , it works, hope helpful.

Neeku's user avatar

Neeku

3,6468 gold badges33 silver badges43 bronze badges

answered Apr 21, 2014 at 9:45

fay's user avatar

1

There is another chance of you to get this particular error if you modify the max_connections in my.cnf file.

I also faced the same error which did not let me log in to MySQL server. In my case the problem was, I had to increase the max_connections size in

/etc/mysql/my.cnf

to

set-variable = max_connections = 5000

Due to this reason next day when I stared MySQL server it threw this error

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

Removing the set-variable = max_connections = 5000 segment from my.conf file did the trick. After removing that particular segment following command was used. MySQL server started up and running like previously.

sudo /etc/init.d/mysql start

answered Feb 8, 2015 at 3:01

Du-Lacoste's user avatar

Du-LacosteDu-Lacoste

11.6k2 gold badges71 silver badges51 bronze badges

This problem will occurred due to some unnecessary changes made in my.cnf file.
Try to diff /etc/mysql/my.cnf with one of working mysql servers my.cnf file.

I just replaced /etc/mysql/my.cnf file with new my.cnf file and this works for me.

ST3's user avatar

ST3

8,8263 gold badges68 silver badges92 bronze badges

answered Sep 29, 2016 at 7:14

sachin's user avatar

sachinsachin

3793 silver badges16 bronze badges

2

Try this:

sudo dpkg-reconfigure mysql-server-{version_number}

version_number should be mysql version number. For example

sudo dpkg-reconfigure mysql-server-5.6

Then access mysql like this:

mysql -u root -p

Llazar's user avatar

Llazar

3,1733 gold badges17 silver badges24 bronze badges

answered Nov 2, 2018 at 9:10

Kon Li's user avatar

If you are using wsl on windows 10 with ubuntu you can run:

  • sudo /etc/init.d/mysql start
    the command sudo service start mysql wont work because you need to configure it. You can find how here

answered Nov 21, 2021 at 17:45

petu's user avatar

petupetu

131 silver badge3 bronze badges

Two main reasons:

1) mysql-server isn’t installed! You have to install it (mysql-server and not mysql-client) and run it.

2) It’s installed by default and running. So, it’s not possible to run it again through Xampp or Lampp. You have to stop it:
sudo service mysql stop

then you can start it through Xampp.
It’s possible to check if it’s running or not with this code:
sudo netstat -tap | grep mysql

If you see a result like this:
tcp 0 0 localhost:mysql : LISTEN 1043/mysqld

It means that it’s running properly.

answered Jul 26, 2015 at 21:49

Aboozar Rajabi's user avatar

make sure the bind address configuration option in the my.cnf file in /etc/ is the same with localhost or virtual serve ip address.
plus check to make sure that the directory for creating the socket file is well specified.

answered Oct 7, 2015 at 13:46

share chris's user avatar

This provides an alternative solution if the issue relates to you. If your disk drive is full than the MYSQL server (and most other programmes) is unable to start. Delete files and folders to allow Mysql-server to start up.

answered Dec 4, 2015 at 13:57

rbwilkinson's user avatar

Simple:
run these codes:::

 1:: ls -lart/var/run/my*

   2::mkdir /var/run/mysqld

    3::touch /var/run/mysqld/mysqld.sock
    4:ls -lart /var/run/mysqld
    5::chown -R mysql /var/run/mysqld
    6::ls -lart /var/run/mysqld
REstart your mysql server

then finaly type mysql -u root or mysql -u root -p and press enter key. thanks

answered Mar 1, 2016 at 23:34

Chikelu Gerald's user avatar

In my case the problem was that I had added «default-character-set=utf8» to my.cnf and that was corrupting the file. Instead change that line for «character_set_server=utf8». That should solve it, hope this helps.

Tim Ogilvy's user avatar

Tim Ogilvy

1,9231 gold badge24 silver badges36 bronze badges

answered Apr 2, 2016 at 11:22

alex's user avatar

Note that I ran into this trouble after I upgraded my Ubuntu 14.04 distribution using apt-get upgrade. I had to completely purge mysql-server and mysql-client and reinstall it to fix this issue.

sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get purge mysql-server mysql-client
sudo apt-get install mysql-server mysql-client

Hope this helps.

answered Aug 6, 2016 at 20:38

Mr. Doomsbuster's user avatar

I was stuck with this error too, and it took almost 3 hours to find it.

First of all, try to recall the changes that you made to your conf file, then undo the changes and save the file and start mysql. If you want to make any changes to the conf file, then stop mysql server and then change the desired values and restart mysql.

This error occurs because of an incorrect (wrong keyword or wrong value assigned) change made to the conf file. Most of the times this error occurs even if you restart the machine running the server, as the server is stopped, in that case, start mysql server.

Eric Aya's user avatar

Eric Aya

69.5k35 gold badges181 silver badges253 bronze badges

answered May 18, 2017 at 13:38

Having trouble with MySQL error 2002 (hy000)? We can help you resolve it.

Usually, this error occurs if MySQL is not running or if it is not getting connected.

At Bobcares, we often get requests from our customers to fix MySQL errors as part of our Server Management Services.

Today, let’s get into the details on how our Support Engineers fix this error.

Why MySQL error 2002 (hy000) occurs?

This error occurs in different scenarios like while connecting to the MySQL server, installing MySQL and so on.

For instance, the error appears as follows.

MySQL error 2002 (hy000)

We can resolve the error by various simple methods like restarting the MySQL server, freeing up some disk space on the droplet, updating the bind-address field, etc.

Let’s see in detail how our Support Engineers fix this problem.

Different methods to sort out MySQL error 2002 (hy000)

At Bobcares, where we have more than a decade of expertise in managing servers, we see many customers face problems with MySQL.

Now, let’s see how our Support Engineers fix this error by various methods.

Restarting the MySQL server

Recently one of our customers was facing the same error when he was trying to connect to the MySQL server. The error received to the customer appears as follows.

We tried to restart the MySQL server by running the below command.

services mysql start

or

/etc/init.d/mysql start

By restarting, the error of the user got disappeared and the database was connected.

Disk space Full

Another customer was facing the same error. On checking further we identified that the disk space of the user’s droplet was full.

So we ran the below command to check how much free space the user is having in the account.

df -h

Further, we went checking for the larger files that was causing the disk space problem. We found that the user had a few huge log files that were eating up all the free spaces. And due to this MySQL simply couldn’t start and gave the ERROR 2002 (HY000).

After rectifying the disk space problem, everything worked fine.

Updating the bind-address

In certain situations, the bind-address will not be updated to the new IP. And this results in the same error.

So, whenever the user creates a new server, we make sure to update the bind-address field with the new IP address. We update the bind-address in the configuration file.

sudo nano /etc/mysql/my.cnf

After updating the bind-address field with the new IP address we then run the below command to restart the MySQL service.

sudo service mysql start

Finally, this fixes the error.

[Having trouble with MySQL error 2002 (hy000)? We’ll fix it for you.]

Conclusion

In short, we resolve the ‘MySQL error 2002 (hy000)’ easily by simple ways like restarting the MySQL server, fixing the disk space, updating the bind-address, etc. Today, we saw how our Support Engineers help the customers to fix the error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

После перезапуска MySQL сервера у меня случился сбой, который выдавал ошибку ERROR 2002 (HY000). С такой проблемой я раньше не сталкивался, поэтому начал активно искать решение…

Непосредственно сам код ошибки выглядел так:

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

Для начала я попытался убить соответствующий PID, как рекомендуют на большинстве форумов, однако это ничего не дало. Поэтому я продолжил искать решение проблему и нашел команду, которая все исправила.

Вообще, эта проблема не новая и интернет переполнен различными вариантами решения. Свое решение я нашел в этом посте на StackOverflow.

sudo chown -R _mysql:mysql /usr/local/var/mysql && sudo brew services restart mysql

После этого, проблема решилась и сервер успешно запустился, поэтому можно работать с данными дальше 😎

Понравилась статья? Поделить с друзьями:
  • Ноутбук не загружается выдает ошибку
  • Ноутбук не включается ошибка загрузки windows
  • Номер ошибки 0x80040707 windows 10 кирилл и мефодий
  • Ноутбук леново ошибка 651
  • Номер ошибки 2001 access