View previous topic :: View next topic |
Author |
Message |
carlos123 Guru
Joined: 12 Feb 2003 Posts: 536 Location: Alberta, Canada.
|
Posted: Sun Mar 16, 2003 12:33 pm Post subject: mysql unable to run after emerge due to socket error?? |
|
|
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 |
|
|
Starfox Tux's lil' helper
Joined: 04 Sep 2002 Posts: 93
|
Posted: Sun Mar 16, 2003 9:07 pm Post subject: |
|
|
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 |
|
|
carlos123 Guru
Joined: 12 Feb 2003 Posts: 536 Location: Alberta, Canada.
|
Posted: Sun Mar 16, 2003 9:47 pm Post subject: |
|
|
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 |
|
|
iplayfast l33t
Joined: 08 Jul 2002 Posts: 642 Location: Cambridge On,CA
|
Posted: Wed May 14, 2003 3:53 am Post subject: |
|
|
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 |
|
|
Detraw Tux's lil' helper
Joined: 21 May 2003 Posts: 84 Location: Sweden
|
Posted: Mon May 26, 2003 10:07 pm Post subject: |
|
|
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 |
|
|
pZYchO n00b
Joined: 28 Apr 2003 Posts: 61
|
Posted: Tue May 27, 2003 10:55 am Post subject: |
|
|
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 |
|
|
kopfarzt Apprentice
Joined: 05 Apr 2003 Posts: 170 Location: Vienna, Austria
|
Posted: Tue May 27, 2003 3:54 pm Post subject: |
|
|
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 |
|
|
gordonNgentoo n00b
Joined: 10 Feb 2003 Posts: 38
|
Posted: Thu May 29, 2003 9:27 am Post subject: solution. |
|
|
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 |
|
Back to top |
|
|
|