MYSQL DATABASE ERROR

4 views
Skip to first unread message

chaco

unread,
Mar 31, 2010, 4:16:17 AM3/31/10
to Techකතා
SSH මගින් Mysql database dump එකක් ගැසීමට යාමේදී පහත සදහන් error
ලැබේ.shared hosting account එකකි.

"mysqldump: Got error: 2002: Can't connect to local MySQL server
through socket '/var/run/mysqld/mysqld.sock' (2) when trying to
connect"


හේතුව කුමක්ද?

Kalinga Athulathmudali

unread,
Mar 31, 2010, 5:08:28 AM3/31/10
to tech...@googlegroups.com
2010/3/31 chaco <prab...@gmail.com>:

මෙයට හේතුවනක් socket එක නැතිවීමයි, MySQL server එක දාවනය වනවානම්, එම
පරිගනකයේ සිට මේ විදානය දෙන්න. මෙමගින් socket නැතුව TCP මගින් සම්බන්ද
වෙයි.

mysqldump --single-transaction -u[username] -p[password] -P[port #]
--protocol=tcp [dbname]

eg:-

mysqldump --single-transaction -uKALINGA -pPASSWORD -P3308
--protocol=TCP TECHKATHA_DB > mybackup.sql

--
කාලිංග ඇතුලත්මුදලි.
http://www.kalingasblog.com
Follow me on Twitter http://twitter.com/kalinga
තාක්ෂණය ඔබට අරියාදු කරනවාද? http://www.techkatha.com
සිංහල බ්ලොග් කියවමු http://blogs.sinhalabloggers.com
සිංහල Geek Chat http://techkatha.com/chat/

chaco

unread,
Mar 31, 2010, 12:46:19 PM3/31/10
to Techකතා
ohoma kalahama mee error eka enawa..
mysqldump: Got error: 2003: Can't connect to MySQL server on
'localhost' (111) when trying to connect


On Mar 31, 2:08 pm, Kalinga Athulathmudali <kaling...@gmail.com>
wrote:
> 2010/3/31 chaco <prabas...@gmail.com>:


>
> > SSH මගින් Mysql database dump එකක් ගැසීමට යාමේදී පහත සදහන් error
> > ලැබේ.shared hosting account එකකි.
>
> > "mysqldump: Got error: 2002: Can't connect to local MySQL server
> > through socket '/var/run/mysqld/mysqld.sock' (2) when trying to
> > connect"
>
> මෙයට හේතුවනක් socket එක නැතිවීමයි, MySQL server එක දාවනය වනවානම්, එම
> පරිගනකයේ සිට මේ විදානය දෙන්න. මෙමගින් socket නැතුව TCP මගින් සම්බන්ද
> වෙයි.
>
> mysqldump --single-transaction -u[username] -p[password] -P[port #]
> --protocol=tcp [dbname]
>
> eg:-
>
> mysqldump --single-transaction -uKALINGA -pPASSWORD -P3308
> --protocol=TCP TECHKATHA_DB > mybackup.sql
>
> --
> කාලිංග ඇතුලත්මුදලි.http://www.kalingasblog.com

> Follow me on Twitterhttp://twitter.com/kalinga
> තාක්ෂණය ඔබට අරියාදු කරනවාද?http://www.techkatha.com

Kalinga Athulathmudali

unread,
Mar 31, 2010, 1:40:47 PM3/31/10
to tech...@googlegroups.com
2010/3/31 chaco <prab...@gmail.com>:

> ohoma kalahama mee error eka enawa..
> mysqldump: Got error: 2003: Can't connect to MySQL server on
> 'localhost' (111) when trying to connect


that mean mysql is not running on the system, so start the mysql service 1st.

/etc/init.d/mysqld start

one more thing, is the DB server is the same host your running this
commands from ? or is it on a deferent server ?

--

කාලිංග ඇතුලත්මුදලි.
http://www.kalingasblog.com

Follow me on Twitter http://twitter.com/kalinga
තාක්ෂණය ඔබට අරියාදු කරනවාද? http://www.techkatha.com

chaco

unread,
Apr 1, 2010, 4:25:46 AM4/1/10
to Techකතා
Thnx for ur response. But

* Starting MySQL database server
mysqld [fail]
i got above error message. i'm using Ubuntu 9.10 and sucessfully
installed Mysql using following commend

"sudo apt-get install mysql-server"

On Mar 31, 10:40 pm, Kalinga Athulathmudali <kaling...@gmail.com>
wrote:
> 2010/3/31 chaco <prabas...@gmail.com>:
>


> > ohoma kalahama mee error eka enawa..
> > mysqldump: Got error: 2003: Can't connect to MySQL server on
> > 'localhost' (111) when trying to connect
>
> that mean mysql is not running on the system, so start the mysql service 1st.
>
> /etc/init.d/mysqld start
>
> one more thing, is the DB server is the same host your running this
> commands from ? or is it on a deferent server ?
>
> --

> කාලිංග ඇතුලත්මුදලි.http://www.kalingasblog.com

> Follow me on Twitterhttp://twitter.com/kalinga
> තාක්ෂණය ඔබට අරියාදු කරනවාද?http://www.techkatha.com

Kalinga Athulathmudali

unread,
Apr 1, 2010, 4:46:32 AM4/1/10
to tech...@googlegroups.com
2010/4/1 chaco <prab...@gmail.com>:

>  Thnx for ur response. But
>
> * Starting MySQL database server
> mysqld                                 [fail]
>  i got above error message. i'm using Ubuntu 9.10 and sucessfully
> installed Mysql using following commend
>
> "sudo apt-get install mysql-server"

check the /var/log/messages file and see what do you see as the error

--

කාලිංග ඇතුලත්මුදලි.
http://www.kalingasblog.com

Follow me on Twitter http://twitter.com/kalinga
තාක්ෂණය ඔබට අරියාදු කරනවාද? http://www.techkatha.com

chaco

unread,
Apr 1, 2010, 7:28:20 AM4/1/10
to Techකතා
Apr 1 16:53:56 chaco-laptop kernel: [ 979.755737] type=1503
audit(1270121036.055:59): operation="open" pid=3749 parent=3748
profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r"
fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"

On Apr 1, 1:46 pm, Kalinga Athulathmudali <kaling...@gmail.com> wrote:
> 2010/4/1 chaco <prabas...@gmail.com>:


>
> >  Thnx for ur response. But
>
> > * Starting MySQL database server
> > mysqld                                 [fail]
> >  i got above error message. i'm using Ubuntu 9.10 and sucessfully
> > installed Mysql using following commend
>
> > "sudo apt-get install mysql-server"
>
> check the /var/log/messages file and see what do you see as the error
>
> --

> කාලිංග ඇතුලත්මුදලි.http://www.kalingasblog.com

> Follow me on Twitterhttp://twitter.com/kalinga
> තාක්ෂණය ඔබට අරියාදු කරනවාද?http://www.techkatha.com

Kalinga Athulathmudali

unread,
Apr 1, 2010, 7:48:54 AM4/1/10
to tech...@googlegroups.com
2010/4/1 chaco <prab...@gmail.com>:

> Apr  1 16:53:56 chaco-laptop kernel: [  979.755737] type=1503
> audit(1270121036.055:59): operation="open" pid=3749 parent=3748
> profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r"
> fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"

try

sudo /etc/init.d/mysqld start


--

කාලිංග ඇතුලත්මුදලි.
http://www.kalingasblog.com

Follow me on Twitter http://twitter.com/kalinga
තාක්ෂණය ඔබට අරියාදු කරනවාද? http://www.techkatha.com

chaco

unread,
Apr 1, 2010, 9:40:32 AM4/1/10
to Techකතා
මගේ binarry address එක 127.0.0.1 නෙමේ තිබුනෙ. එක හැදුවහම හරි ගියා. එත්
dump එක ගහ ගන්න බැහැ.

mysqldump: Got error: 2003: Can't connect to MySQL server on
'localhost' (111) when trying to connect

error එක එනවා. මම හිතන්නෙ host කරල තියෙන් server එකේ අවුලක් වෙන්න
අඇති.

On Apr 1, 4:48 pm, Kalinga Athulathmudali <kaling...@gmail.com> wrote:
> 2010/4/1 chaco <prabas...@gmail.com>:
>

> > Apr  1 16:53:56 chaco-laptop kernel: [  979.755737] type=1503
> > audit(1270121036.055:59): operation="open" pid=3749 parent=3748
> > profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r"
> > fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
>
> try
>
> sudo /etc/init.d/mysqld start
>
> --

> කාලිංග ඇතුලත්මුදලි.http://www.kalingasblog.com

> Follow me on Twitterhttp://twitter.com/kalinga
> තාක්ෂණය ඔබට අරියාදු කරනවාද?http://www.techkatha.com

Reply all
Reply to author
Forward
0 new messages