LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-12-2004, 02:00 PM   #1
krilen
Member
 
Registered: Mar 2004
Distribution: CentOS, FreeBSD
Posts: 42

Rep: Reputation: 15
Can't start mysql


Hi.

I am installing Mysql 4.0, apache 1.3, PHP 5.0 on fedora 1 all from source.

Started with the Mysql installation, then apache and PHP.PHP and apache works fine but I can't start mysql.

After the installation I started mysql and I got the error

ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

I don't have a /tmp/mysql.sock, I tried to touch a file but I still have the same fault (111 instead of 2). Even my phpinfo() says that /tmp/mysql.sock should exists.

Does anyone have any idea? Greateful for any help.

/Krilen
 
Old 08-12-2004, 02:34 PM   #2
Charalambos
Member
 
Registered: Aug 2004
Location: Switzerland
Distribution: debian
Posts: 149

Rep: Reputation: 15
What command did you use to start mysql?
--> /sbin/service mysqld start ?
 
Old 08-12-2004, 02:36 PM   #3
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
/tmp/mysql.sock exists only when MySQL is actually running. Are you sure it started correctly (the init script usually works well out of the box)? Can you see mysqld in your ps output?


Håkan
 
Old 08-12-2004, 02:50 PM   #4
krilen
Member
 
Registered: Mar 2004
Distribution: CentOS, FreeBSD
Posts: 42

Original Poster
Rep: Reputation: 15
I started the server with:
/usr/local/bin/mysql

And I can't se anything running with ps that looks like mysql.

/Krilen
 
Old 08-12-2004, 02:52 PM   #5
Charalambos
Member
 
Registered: Aug 2004
Location: Switzerland
Distribution: debian
Posts: 149

Rep: Reputation: 15
Start it with the command
--> /sbin/service mysqld start
and it will create a socket for you and mysql will be running.

If you start the daemon directly with
--> /usr/local/bin/mysql
it will directly start mysql without creating a socket and therefor fail.
 
Old 08-12-2004, 02:55 PM   #6
krilen
Member
 
Registered: Mar 2004
Distribution: CentOS, FreeBSD
Posts: 42

Original Poster
Rep: Reputation: 15
Get the error:
mysqld: unrecognized service

/Krilen
 
Old 08-12-2004, 02:58 PM   #7
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
This seems to be SuSE only, but I start mysql here with "rcmysql start"... worth the shot I guess :=)
 
Old 08-12-2004, 03:01 PM   #8
Charalambos
Member
 
Registered: Aug 2004
Location: Switzerland
Distribution: debian
Posts: 149

Rep: Reputation: 15
This really is SuSE only.
The counterpart of it in red hat is the command i mentioned above.

But nevertheless, worth the shot :-)
 
Old 08-12-2004, 03:05 PM   #9
krilen
Member
 
Registered: Mar 2004
Distribution: CentOS, FreeBSD
Posts: 42

Original Poster
Rep: Reputation: 15
Sorry no help, error:
-bash: rcmysql: command not found

I found another log, when I try to start this:

/usr/local/bin/mysqld_safe &

I get this outprint:
Starting mysqld daemon with databases from /usr/local/var
040812 21:02:50 mysqld ended

and the log /usr/local/var/thor.err (thor is the name of my machine) says:

040812 21:02:50 mysqld started
InnoDB: unable to create ./innodb.status.2209: Permission denied
040812 21:02:50 Can't init databases
040812 21:02:50 Aborting

040812 21:02:50 InnoDB: Warning: shutting down a not properly started
InnoDB: or created database!
040812 21:02:50 /usr/local/libexec/mysqld: Shutdown Complete

040812 21:02:50 mysqld ended

Can this help?

/Krilen
 
Old 08-12-2004, 03:15 PM   #10
Charalambos
Member
 
Registered: Aug 2004
Location: Switzerland
Distribution: debian
Posts: 149

Rep: Reputation: 15
Try executing the startup script for mysql. I think the following should be correct.

-->/etc/rc.d/init.d/mysqld start
 
Old 08-12-2004, 03:18 PM   #11
krilen
Member
 
Registered: Mar 2004
Distribution: CentOS, FreeBSD
Posts: 42

Original Poster
Rep: Reputation: 15
/etc/rc.d/init.d/mysqld: No such file or directory
 
Old 08-12-2004, 03:21 PM   #12
Charalambos
Member
 
Registered: Aug 2004
Location: Switzerland
Distribution: debian
Posts: 149

Rep: Reputation: 15
oops, i think this isn't correct
--> /sbin/service mysqld start
it should be
--> /sbin/service mysql start
or something similiar (depending on distro version...).

When i make a suggestion, try it with a few deviations...
 
Old 08-12-2004, 03:29 PM   #13
krilen
Member
 
Registered: Mar 2004
Distribution: CentOS, FreeBSD
Posts: 42

Original Poster
Rep: Reputation: 15
Isn't /sbin/service xxxxxx start/stop etc for programs that is installed with packages for the specific distribution. In my case rpm packages because I use fedora.

If I run:
/sbin/service --status-all

I get all the program that was installed at the installation, cron, sendmail, sshd etc. And none of the program that I installed from source.

/Krilen
 
Old 08-12-2004, 03:38 PM   #14
Charalambos
Member
 
Registered: Aug 2004
Location: Switzerland
Distribution: debian
Posts: 149

Rep: Reputation: 15
Quote:
Originally posted by krilen
I get all the program that was installed at the installation, cron, sendmail, sshd etc. And none of the program that I installed from source.
That why. I proceeded on the assumption that you installed it as packet.
 
Old 08-13-2004, 02:16 AM   #15
krilen
Member
 
Registered: Mar 2004
Distribution: CentOS, FreeBSD
Posts: 42

Original Poster
Rep: Reputation: 15
Found the problem this morning, maybe I was to tiered (or stupied) last night.

I forgot to change /usr/local/var to mysql owner and group.

/Krilen
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Starting MySQL OLD Error : imeout error occurred trying to start MySQL Daemon Fr33B5D Linux - Software 9 10-28-2006 06:23 AM
mysql doesn't start devit Linux - General 12 05-21-2004 03:24 PM
MySql error 2002, Cannot start mysql djchris Linux - Software 5 04-13-2004 06:12 PM
Cannot start MySQL cisco_kidd20 Linux - Software 13 03-25-2004 10:04 AM
I can't get MySQL to start. Travis86 Linux - Software 5 11-07-2003 11:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:07 PM.

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