Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm trying to access PHPMyAdmin in my localhost, but when I write down the username and password, it gives this message:

 mysqli_real_connect(): (HY000/2002): No such file or directory

If i write "mysql" on terminal, it shows me this:

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

I've looked up the solution for this, but what I encountered was to check the "var/log/mysql/error.log". I did that, and that file is empty. I have no idea what I have to do here and it seems none of the solutions I found on the internet helped me on this one. I tried re-installing MySQL but it didn't change anything

If i try to "sudo service mysql start", it shows me this:

Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.

systemctl status mysql.service:

mysql.service - MySQL Community Server
 Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
 Active: failed (Result: exit-code) since Mon 2020-12-21 15:01:42 -03; 3min 54s ago
Process: 24948 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE)
dez 21 15:01:42 eduardo-System-Product-Name systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
dez 21 15:01:42 eduardo-System-Product-Name systemd[1]: Stopped MySQL Community Server.
dez 21 15:01:42 eduardo-System-Product-Name systemd[1]: mysql.service: Start request repeated too quickly.
dez 21 15:01:42 eduardo-System-Product-Name systemd[1]: mysql.service: Failed with result 'exit-code'.
dez 21 15:01:42 eduardo-System-Product-Name systemd[1]: Failed to start MySQL Community Server.

journalctl -xe:

-- 
-- A unidade mysql.service concluiu o desligamento.
dez 21 15:01:42 eduardo-System-Product-Name systemd[1]: mysql.service: Start request repeated too quickly.
dez 21 15:01:42 eduardo-System-Product-Name systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'.
dez 21 15:01:42 eduardo-System-Product-Name systemd[1]: Failed to start MySQL Community Server.
-- Subject: A unidade mysql.service falhou
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A unidade mysql.service falhou.
-- 
-- O resultado é failed.
dez 21 15:01:43 eduardo-System-Product-Name gnome-terminal-[23942]: g_menu_insert_item: assertion 'G_IS_MENU_ITEM (item)' failed
dez 21 15:01:49 eduardo-System-Product-Name kernel: [UFW BLOCK] IN=enp3s0 OUT= MAC=01:00:5e:00:00:01:18:9c:27:4f:4e:71:08:00 SRC=1>
dez 21 15:03:54 eduardo-System-Product-Name kernel: [UFW BLOCK] IN=enp3s0 OUT= MAC=01:00:5e:00:00:01:18:9c:27:4f:4e:71:08:00 SRC=1>
dez 21 15:05:04 eduardo-System-Product-Name kernel: [UFW BLOCK] IN=enp3s0 OUT= MAC=01:00:5e:00:00:01:18:9c:27:4f:4e:71:08:00 SRC=1>
dez 21 15:05:34 eduardo-System-Product-Name gnome-terminal-[23942]: g_menu_insert_item: assertion 'G_IS_MENU_ITEM (item)' failed
dez 21 15:05:41 eduardo-System-Product-Name gnome-terminal-[23942]: g_menu_insert_item: assertion 'G_IS_MENU_ITEM (item)' failed
lines 2441-2464/2464 (END)
-- Support: http://www.ubuntu.com/support
-- 
-- A unidade mysql.service concluiu o desligamento.
dez 21 15:01:42 eduardo-System-Product-Name systemd[1]: mysql.service: Start request repeated too quickly.
dez 21 15:01:42 eduardo-System-Product-Name systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'.
dez 21 15:01:42 eduardo-System-Product-Name systemd[1]: Failed to start MySQL Community Server.
-- Subject: A unidade mysql.service falhou
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A unidade mysql.service falhou.
-- 
-- O resultado é failed.
dez 21 15:01:43 eduardo-System-Product-Name gnome-terminal-[23942]: g_menu_insert_item: assertion 'G_IS_MENU_ITEM (item)' failed
dez 21 15:01:49 eduardo-System-Product-Name kernel: [UFW BLOCK] IN=enp3s0 OUT= MAC=01:00:5e:00:00:01:18:9c:27:4f:4e:71:08:00 SRC=192.168.0.1 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0xC0 TTL=1 ID=20290 PROTO=2 
dez 21 15:03:54 eduardo-System-Product-Name kernel: [UFW BLOCK] IN=enp3s0 OUT= MAC=01:00:5e:00:00:01:18:9c:27:4f:4e:71:08:00 SRC=192.168.0.1 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0xC0 TTL=1 ID=20298 PROTO=2 
dez 21 15:05:04 eduardo-System-Product-Name kernel: [UFW BLOCK] IN=enp3s0 OUT= MAC=01:00:5e:00:00:01:18:9c:27:4f:4e:71:08:00 SRC=192.168.0.1 DST=224.0.0.1 LEN=36 TOS=0x00 PREC=0xC0 TTL=1 ID=20304 PROTO=2 
dez 21 15:05:34 eduardo-System-Product-Name gnome-terminal-[23942]: g_menu_insert_item: assertion 'G_IS_MENU_ITEM (item)' failed
dez 21 15:05:41 eduardo-System-Product-Name gnome-terminal-[23942]: g_menu_insert_item: assertion 'G_IS_MENU_ITEM (item)' failed

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
520 views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...