LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can't start mysql (https://www.linuxquestions.org/questions/linux-software-2/cant-start-mysql-216800/)

krilen 08-12-2004 02:00 PM

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

Charalambos 08-12-2004 02:34 PM

What command did you use to start mysql?
--> /sbin/service mysqld start ?

hw-tph 08-12-2004 02:36 PM

/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

krilen 08-12-2004 02:50 PM

I started the server with:
/usr/local/bin/mysql

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

/Krilen

Charalambos 08-12-2004 02:52 PM

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.

krilen 08-12-2004 02:55 PM

Get the error:
mysqld: unrecognized service

/Krilen

Mega Man X 08-12-2004 02:58 PM

This seems to be SuSE only, but I start mysql here with "rcmysql start"... worth the shot I guess :=)

Charalambos 08-12-2004 03:01 PM

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

But nevertheless, worth the shot :-)

krilen 08-12-2004 03:05 PM

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

Charalambos 08-12-2004 03:15 PM

Try executing the startup script for mysql. I think the following should be correct.

-->/etc/rc.d/init.d/mysqld start

krilen 08-12-2004 03:18 PM

/etc/rc.d/init.d/mysqld: No such file or directory

Charalambos 08-12-2004 03:21 PM

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...

krilen 08-12-2004 03:29 PM

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

Charalambos 08-12-2004 03:38 PM

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.

krilen 08-13-2004 02:16 AM

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


All times are GMT -5. The time now is 09:51 PM.