ERROR 2002 (HY000): Can't connect to local MySQL server thro

Diskusi tentang Ubuntu Server baik webserver, database server, samba server dan service lainnya serta jaringan menggunakan Sistem Operasi Ubuntu.
User avatar
s0t4
Posts: 32
Joined: 12 Apr 2010, 07:47

ERROR 2002 (HY000): Can't connect to local MySQL server thro

Postby s0t4 » 21 Apr 2011, 08:20

Para Master,


Mau tanya, kenapa mysql saya keluar error berikut :

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

Ini terjadi saat saya pindahkan lokasi data mysql ke /mnt/mysql (di hardisk lainnya).


/etc/mysql/my.cnf sudah saya ubah
datadir = /mnt/mysql


folder /mnt/mysql juga sudah diset ownernya ke mysql
#chown -R mysql:mysql /mnt/mysql




please help,
Thnks
User avatar
saa7_go
Posts: 464
Joined: 21 Jan 2011, 23:37
Contact:

Re: ERROR 2002 (HY000): Can't connect to local MySQL server

Postby saa7_go » 21 Apr 2011, 08:34

Biasanya, kalo mysql server-nya belum dijalankan, terus kamu mencoba akses melalui mysqlclient(mysql) akan keluar pesan error seperti itu. Masalahnya, error itu muncul waktu kamu menjalankan apa?

Edit: coba kamu baca dulu di http://www.ubuntugeek.com/how-to-change ... ctory.html
Last edited by saa7_go on 27 Feb 2016, 16:50, edited 1 time in total.
Reason: tambahan informasi
User avatar
s0t4
Posts: 32
Joined: 12 Apr 2010, 07:47

Re: ERROR 2002 (HY000): Can't connect to local MySQL server

Postby s0t4 » 21 Apr 2011, 13:41

itu terjadi saat jalankan mysql...


Tampaknya ini karena apparmor-nya... (setelah saya baca ubuntugeeknya seperti petunjuknya)


Saya coba dulu...


Terima kasih banyak...
User avatar
s0t4
Posts: 32
Joined: 12 Apr 2010, 07:47

Re: ERROR 2002 (HY000): Can't connect to local MySQL server

Postby s0t4 » 21 Apr 2011, 13:53

sudah bisa master...

Benar karena di apparmornya belum diedit...



thnks
User avatar
izzakhaerani
Posts: 2
Joined: 17 May 2014, 06:35
Location: Semarang

Re: ERROR 2002 (HY000): Can't connect to local MySQL server

Postby izzakhaerani » 17 May 2014, 08:06

saya mempunyai kesalahan yang sama dengan anda, tetapi tetap error yang sama padahal sudah saya edit appamornya. mohon pencerahan masta
User avatar
sephiroth
Posts: 517
Joined: 01 Jan 2010, 07:15
Location: Juwana (pantura)
Contact:

Re: ERROR 2002 (HY000): Can't connect to local MySQL server

Postby sephiroth » 19 May 2014, 12:45

saya ada error sama,tp ada error lagi ky gini:
[....] Starting AppArmor profiles:[info] AppArmor not available as kernel LSM..
failed!

Return to “Ubuntu Server”

Who is online

Users browsing this forum: Google [Bot] and 1 guest