LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-10-2004, 11:54 AM   #1
romel
Member
 
Registered: Sep 2003
Location: Bangladesh
Distribution: Debian
Posts: 102

Rep: Reputation: 15
Unhappy mysql problem...


When I try to run mysql it says...

[root@pc2 /]# mysql
ERROR 2002: Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (111)
[root@pc2 /]#

I think I need some suggesion or hint...
 
Old 04-10-2004, 12:13 PM   #2
miknight
Member
 
Registered: Oct 2002
Location: Sydney, Australia
Distribution: Gentoo, Ubuntu, Debian
Posts: 184

Rep: Reputation: 30
Is mysqld running? Check the process table (ps -A).
 
Old 04-10-2004, 02:44 PM   #3
Evilone
Member
 
Registered: Oct 2002
Location: UK
Distribution: Slack 9.1 (2.6.5)
Posts: 307

Rep: Reputation: 30
It does indeed sound like you don't have mysql running, Here's how to make sure it's set up properly :

Further notes on mysql:
From an initial install the databases have to be created for the
users, typing:
mysql_install_db

should create the tables but then the owner for these files needs to be
changed to 'mysql' instead of root.
The files in question are in /var/lib/mysql and the owner and group both
need to be set to mysql ie:

cd var/lib/mysql
chown -R mysql:mysql mysql

Mysql can then be started:
safe_mysqld &

and mysqladmin used to change the root password:

mysqladmin -u root password 'new-password'

Other users can then be setup on mysql by logging in and then using:

grant all on * to fred identified by 'pass' with grant option;
This would grant all privileges on all db's to fred
 
Old 04-10-2004, 07:38 PM   #4
romel
Member
 
Registered: Sep 2003
Location: Bangladesh
Distribution: Debian
Posts: 102

Original Poster
Rep: Reputation: 15
mysqld is not running....when I give ps -A it says..

[root@pc2 /]# ps -A
PID TTY TIME CMD
1 ? 00:00:49 init
2 ? 00:00:00 keventd
3 ? 00:00:00 kapmd
4 ? 00:00:00 ksoftirqd_CPU0
9 ? 00:00:00 bdflush
5 ? 00:00:00 kswapd
6 ? 00:00:00 kscand/DMA
7 ? 00:00:00 kscand/Normal
8 ? 00:00:00 kscand/HighMem
10 ? 00:00:00 kupdated
11 ? 00:00:00 mdrecoveryd
70 ? 00:00:00 khubd
2160 ? 00:00:00 syslogd
2164 ? 00:00:00 klogd
2190 ? 00:00:00 portmap
2209 ? 00:00:00 rpc.statd
2278 ? 00:00:00 apmd
2316 ? 00:00:00 identd
2340 ? 00:00:00 snmpd
2350 ? 00:00:00 named
2362 ? 00:00:00 routed
2372 ? 00:00:00 sshd
2386 ? 00:00:00 xinetd
2398 ? 00:00:00 ntpd
2414 ? 00:00:00 nwserv
2423 ? 00:00:00 nwbind
2429 ? 00:00:00 rpc.rquotad
2434 ? 00:00:00 nfsd
2435 ? 00:00:00 nfsd
2436 ? 00:00:00 nfsd
2437 ? 00:00:00 nfsd
2438 ? 00:00:00 nfsd
2439 ? 00:00:00 nfsd
2440 ? 00:00:00 nfsd
2441 ? 00:00:00 nfsd
2444 ? 00:00:00 lockd
2445 ? 00:00:00 rpciod
2449 ? 00:00:00 rpc.mountd
2458 ? 00:00:00 rpc.rstatd
2468 ? 00:00:00 vsftpd
2499 ? 00:00:00 ncpserv
2506 ? 00:00:00 netdump-server
2525 ? 00:00:00 sendmail
2534 ? 00:00:00 sendmail
2544 ? 00:00:01 spamd
2555 ? 00:00:00 scsi_eh_0
2560 ? 00:00:00 iscsid
2568 ? 00:00:00 gpm
2579 ? 00:00:00 httpd
2630 ? 00:00:00 postmaster
2632 ? 00:00:00 postmaster
2633 ? 00:00:00 postmaster
2647 ? 00:00:00 cannaserver
2658 ? 00:00:00 crond
2666 ? 00:00:00 httpd
2667 ? 00:00:00 httpd
2668 ? 00:00:00 httpd
2669 ? 00:00:00 httpd
2670 ? 00:00:00 httpd
2671 ? 00:00:00 httpd
2672 ? 00:00:00 httpd
2673 ? 00:00:00 httpd
2677 ? 00:00:00 cupsd
2721 ? 00:00:00 jserver
2733 ? 00:00:00 squid
2735 ? 00:00:00 squid
2737 ? 00:00:00 unlinkd
2815 ? 00:00:00 xfs
2836 ? 00:00:00 atalkd
2837 ? 00:00:00 smbd
2841 ? 00:00:00 nmbd
2850 ? 00:00:00 winbindd
2859 ? 00:00:00 anacron
2868 ? 00:00:00 atd
2909 ? 00:00:00 login
2910 tty2 00:00:00 mingetty
2911 tty3 00:00:00 mingetty
2912 tty4 00:00:00 mingetty
2913 tty5 00:00:00 mingetty
2914 tty6 00:00:00 mingetty
2915 ? 00:00:00 sshd
2917 pts/0 00:00:00 bash
2969 ? 00:00:00 papd
2973 ? 00:00:00 afpd
2976 tty1 00:00:00 bash
3031 pts/0 00:00:00 ps
[root@pc2 /]#

when I give mysql_install_db it says...

[root@pc2 /]# mysql_install_db
Installing all prepared tables
040411 6:34:47 /usr/local/libexec/mysqld: Shutdown Complete


To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
/usr/local/bin/mysqladmin -u root password 'new-password'
/usr/local/bin/mysqladmin -u root -h pc2.dns2.com password 'new-password'
See the manual for more instructions.

NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/local/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd /usr/local ; /usr/local/bin/safe_mysqld &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; run-all-tests

Please report any problems with the /usr/local/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

[root@pc2 /]#

I am very much new to use mysql at linux....
 
Old 04-11-2004, 04:21 AM   #5
Evilone
Member
 
Registered: Oct 2002
Location: UK
Distribution: Slack 9.1 (2.6.5)
Posts: 307

Rep: Reputation: 30
Well done, that's the first step out of the way, now continue and follow my instructions from earlier, you'll be fine.

Ade
 
Old 04-11-2004, 08:55 PM   #6
romel
Member
 
Registered: Sep 2003
Location: Bangladesh
Distribution: Debian
Posts: 102

Original Poster
Rep: Reputation: 15
I think my rpm and tar file is creating problem for me..

can you tell me how can I uninstall any tar file..

I mean I have downloaded mysql-3.23.56.tar.gz then untar it and run ./configure, make and make install ...

but before that I did not remove the rpm package which were already installed...

I think these two installation is creating problem for me...

I am trying one thing which says...

[root@pc4 /]# rpm -evv mysql
Segmentation fault
[root@pc4 /]#

what is that segmentation fault...

or can you tell me that how can I uninstall the tar file installation..
 
Old 04-12-2004, 03:07 AM   #7
Evilone
Member
 
Registered: Oct 2002
Location: UK
Distribution: Slack 9.1 (2.6.5)
Posts: 307

Rep: Reputation: 30
go back to your source folder and type :

make uninstall
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bugzilla - MySQL - perl - DBD::mysql install problem Runningonair Linux - Software 8 10-12-2007 12:42 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
mysql 4.0.24 to mysql 4.1.12 upgrade problem tuxrules Slackware 7 08-13-2005 06:43 PM
MySQL server problem after linking (mysql.sock) ewijaya Linux - General 4 01-19-2004 09:46 AM
MySQL mysql-3.23.56-1.9, rpm install problem jacsmith510 Linux - Newbie 3 09-19-2003 02:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration