Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mysql unable to run after emerge due to socket error??
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
carlos123
Guru
Guru


Joined: 12 Feb 2003
Posts: 536
Location: Alberta, Canada.

PostPosted: Sun Mar 16, 2003 12:33 pm    Post subject: mysql unable to run after emerge due to socket error?? Reply with quote

I recently emerged mysql and have not been able to run it yet.

When I do a "mysql" from a root user command prompt I get...

Code:

pine [/etc]
# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
pine [/etc]


For some time I have seen a warning (or error?) being reported on bootup. I am wondering if it has something to do with my inability to run mysql? The message at bootup says...

Code:

NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
ds: no socket drivers loaded!


Am I missing something in my kernel? How do I get around this socket error condition?

Any insight would be appreciated.

Thanks.

Carlos
_________________
I'm not yet a real Guru so if you are a newbie here and want to teach me a thing or two, please do! I'm still learning just like you.
Back to top
View user's profile Send private message
Starfox
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2002
Posts: 93

PostPosted: Sun Mar 16, 2003 9:07 pm    Post subject: Reply with quote

Have you tried to connect via TCP/IP maybe with mysqlcc ???
If even this fails, have you started mysqld??? (etc/init.d/mysqld start)?? (I know this might be a stupid help, as you're already apprentice, but maybe...)
is mysqld reporting any errors???
Back to top
View user's profile Send private message
carlos123
Guru
Guru


Joined: 12 Feb 2003
Posts: 536
Location: Alberta, Canada.

PostPosted: Sun Mar 16, 2003 9:47 pm    Post subject: Reply with quote

Thanks very much Starfox. Your suggestions helped me figure out how to start it!! Even if I am an apprentice :)

Actually I am really still a newbie who has been asking a lot of questions which has resulted in being labeled an apprentice. Next thing you know I'll be labeled a guru.

Here's what I did to get it working for those having a similar problem...

Code:

carlos@pine [~]
$ mysqlcc
bash: mysqlcc: command not found
carlos@pine [~]
$ mysqld
bash: mysqld: command not found
carlos@pine [~]
$ su -
Password:
pine [~]
# find / -name mysqlcc
/usr/portage/dev-db/mysqlcc
pine [~]
# find / -name mysqld
/var/run/mysqld
/usr/sbin/mysqld
pine [~]
# /usr/sbin/mysqld
030316  6:32:48  /usr/sbin/mysqld: Table 'mysql.host' doesn't exist
pine [~]
# /etc/init.d/mysql status
 * status:  stopped
pine [~]
# /etc/init.d/mysql start
 * You dont appear to have the mysql database installed yet.
 * Please run /usr/bin/mysql_install_db to have this done...
pine [~]
# /usr/bin/mysql_install_db
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
030316  6:33:57  /usr/sbin/mysqld: Shutdown Complete


PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
/etc/init.d/mysql start  (you have to start the server first!)
/usr/bin/mysqladmin -u root  password 'new-password'
/usr/bin/mysqladmin -u root -h pine  password 'new-password'
See the manual for more instructions.

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com

pine [~]
# /etc/init.d/mysql start
 * Starting mysqld...                                                     [ ok ]
pine [~]
# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 3.23.54-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> exit
Bye
pine [~]
#


Carlos
_________________
I'm not yet a real Guru so if you are a newbie here and want to teach me a thing or two, please do! I'm still learning just like you.
Back to top
View user's profile Send private message
iplayfast
l33t
l33t


Joined: 08 Jul 2002
Posts: 642
Location: Cambridge On,CA

PostPosted: Wed May 14, 2003 3:53 am    Post subject: Reply with quote

I was right with you until the end.
Code:

Martha mysql # /etc/init.d/mysql start
 * WARNING:  "mysql" has already been started.
Martha mysql # mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


(Which is where I started from).

It thinks that mysqld has been started, yet no socket is there.

Anyone have a clue?

Thanks
Back to top
View user's profile Send private message
Detraw
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2003
Posts: 84
Location: Sweden

PostPosted: Mon May 26, 2003 10:07 pm    Post subject: Reply with quote

I have exactly that same problem as iplayfast, doesn't anyone have a solution to this???

/Daniel
_________________
damn this Linux world is big :)
Back to top
View user's profile Send private message
pZYchO
n00b
n00b


Joined: 28 Apr 2003
Posts: 61

PostPosted: Tue May 27, 2003 10:55 am    Post subject: Reply with quote

Hi,

what's in /etc/my.cnf ? Have you already looked up open ports and sockets with netstat -na ? If not plz look it up and post if you don't know what it mean... =)
Back to top
View user's profile Send private message
kopfarzt
Apprentice
Apprentice


Joined: 05 Apr 2003
Posts: 170
Location: Vienna, Austria

PostPosted: Tue May 27, 2003 3:54 pm    Post subject: Reply with quote

If mysqld is not running, try
Code:
/etc/init.d/mysqld zap
. Then you can try to start again. Also look at your mysql logfiles, which can be found in /var/log/mysql (if you are using metalog).

kopfarzt
Back to top
View user's profile Send private message
gordonNgentoo
n00b
n00b


Joined: 10 Feb 2003
Posts: 38

PostPosted: Thu May 29, 2003 9:27 am    Post subject: solution. Reply with quote

I had this problem about not being able to connect.

mysql is a client.
mysqld is a daemon which you need to first run.
To load the mysqld, u need a script to do that, and it's called safe_mysqld

ace root # which safe_mysqld
/usr/bin/safe_mysqld

after that, u need to connect to the mysqld by:
mysql -p -u root

use -p if there's a password assigned; u'll be prompted a password.
if a password was assigned and u forgot it, that's a harder thing to solve..i suggest you read the mysql manual from the mysql site.

-Gordon :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum