Red Hat Configuration - redhat and MySQL

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Configuration > June 2004 > redhat and MySQL





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author redhat and MySQL
Jerry Polyak

2004-05-25, 4:32 pm

Hi,

I am trying to run mysql on RedHat 9.0. I installed every package under SQL
database & mysql database. But so far I don't think mysql is running. When
trying to connect to the database using php I get the following error:
"Can't connect to local mysql server through socket
'/var/lib/mysql/mysql.sock' (2)" After checking I found that the file
doesn't exist.

How do I start mysql under RedHat?

What else am I doing wrong?

TIA

Jerry Polyak


Alexander Dalloz

2004-05-25, 4:32 pm

On Tue, 25 May 2004 11:07:31 -0700 Jerry Polyak wrote:

> How do I start mysql under RedHat?


> Jerry Polyak


chkconfig mysqld on
service mysqld start

Alexander


--
Alexander Dalloz | Enger, Germany
PGP key valid: made 13.07.1999
PGP fingerprint: 2307 88FD 2D41 038E 7416 14CD E197 6E88 ED69 5653

Jerry Polyak

2004-05-25, 4:32 pm


"Alexander Dalloz" <alexander.dalloz@uni-bielefeld.de> wrote in message
news:pan.2004.05.25.18.31.34.393359@uni-bielefeld.de...
> On Tue, 25 May 2004 11:07:31 -0700 Jerry Polyak wrote:
>
>
>
> chkconfig mysqld on
> service mysqld start
>
> Alexander
>
>
> --
> Alexander Dalloz | Enger, Germany
> PGP key valid: made 13.07.1999
> PGP fingerprint: 2307 88FD 2D41 038E 7416 14CD E197 6E88 ED69 5653
>


I am new to this, so can you be more specific?

Thanks.


Jerry Polyak

2004-05-25, 4:32 pm


"Alexander Dalloz" <alexander.dalloz@uni-bielefeld.de> wrote in message
news:pan.2004.05.25.18.31.34.393359@uni-bielefeld.de...
> On Tue, 25 May 2004 11:07:31 -0700 Jerry Polyak wrote:
>
>
>
> chkconfig mysqld on
> service mysqld start
>
> Alexander
>
>
> --
> Alexander Dalloz | Enger, Germany
> PGP key valid: made 13.07.1999
> PGP fingerprint: 2307 88FD 2D41 038E 7416 14CD E197 6E88 ED69 5653
>


More accurately, when I try running your commands I get: no such file or
directory.


Michael Heiming

2004-05-25, 4:32 pm

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message

In linux.redhat Jerry Polyak <jerrypolyakl@nospam.yahoo.com> suggested:

> "Alexander Dalloz" <alexander.dalloz@uni-bielefeld.de> wrote in message
> news:pan.2004.05.25.18.31.34.393359@uni-bielefeld.de...
[vbcol=seagreen]
> More accurately, when I try running your commands I get: no such file or
> directory.


You are running this as root?

Sounds like the mysql server package isn't installed at all, try
to check:

rpm -qa | grep mysql

--
Michael Heiming (GPG-Key ID: 0xEDD27B94)
mail: echo zvpunry@urvzvat.qr | PERL -pe 'y/a-z/n-za-m/'
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFAs611AkPEju3Se5QRAlpCAKCdkYRmApAl
+rLvkGRnh59n+yEZ9QCgiSqD
HM0L3KZhKMDkgv34b3PAy5o=
=ekq+
-----END PGP SIGNATURE-----
Jerry Polyak

2004-05-25, 11:34 pm


"Michael Heiming" <michael+USENET@www.heiming.de> wrote in message
news:m4nco1-7d2.ln1@news.heiming.de...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> NotDashEscaped: You need GnuPG to verify this message
>
> In linux.redhat Jerry Polyak <jerrypolyakl@nospam.yahoo.com> suggested:
>
>
>
> You are running this as root?
>
> Sounds like the mysql server package isn't installed at all, try
> to check:
>
> rpm -qa | grep mysql
>
> --
> Michael Heiming (GPG-Key ID: 0xEDD27B94)
> mail: echo zvpunry@urvzvat.qr | PERL -pe 'y/a-z/n-za-m/'
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
>
> iD8DBQFAs611AkPEju3Se5QRAlpCAKCdkYRmApAl
+rLvkGRnh59n+yEZ9QCgiSqD
> HM0L3KZhKMDkgv34b3PAy5o=
> =ekq+
> -----END PGP SIGNATURE-----


Got it sorted, thanks. Client wasn't installed for some reason.


Alexander Dalloz

2004-05-25, 11:34 pm

On Tue, 25 May 2004 11:45:41 -0700 Jerry Polyak wrote:

[vbcol=seagreen]
>
> I am new to this, so can you be more specific?


Who prevents you from reading "man chkconfig" and "service --help"? In
addition read /usr/share/doc/initscripts-*/sysvinitfiles.

Alexander


--
Alexander Dalloz | Enger, Germany
PGP key valid: made 13.07.1999
PGP fingerprint: 2307 88FD 2D41 038E 7416 14CD E197 6E88 ED69 5653

Jerry Polyak

2004-05-25, 11:34 pm


"Alexander Dalloz" <alexander.dalloz@uni-bielefeld.de> wrote in message
news:pan.2004.05.25.22.31.47.483157@uni-bielefeld.de...
> On Tue, 25 May 2004 11:45:41 -0700 Jerry Polyak wrote:
>
>
>
> Who prevents you from reading "man chkconfig" and "service --help"? In
> addition read /usr/share/doc/initscripts-*/sysvinitfiles.
>
> Alexander
>
>
> --
> Alexander Dalloz | Enger, Germany
> PGP key valid: made 13.07.1999
> PGP fingerprint: 2307 88FD 2D41 038E 7416 14CD E197 6E88 ED69 5653
>


So your advice amounts to: "Read the manual"? If we all did that and it
worked 100% of the time, than there would be no use for NG, would there?


Alexander Dalloz

2004-05-30, 11:48 am

On Tue, 25 May 2004 16:30:42 -0700 Jerry Polyak wrote:

> So your advice amounts to: "Read the manual"? If we all did that and it
> worked 100% of the time, than there would be no use for NG, would there?


In a perfect world, yes ;)

Of course sometimes people are too lazy and like to listen to a story
teller, reading the manuals for them, like in a class room. Sometimes they
have to be reminded that they can read their own and that it makes not
much sense to read the stuff to someone.

On the other side there are complex issues where the good manuals are just
one part and some kind of a teacher with a profound knowledge is needed to
understand the backgrounds and the whole case at all.

But that wasn't the case here. The commands "chkconfig" (with a good man
page) and "service" are really trivial.

Alexander


--
Alexander Dalloz | Enger, Germany
PGP key valid: made 13.07.1999
PGP fingerprint: 2307 88FD 2D41 038E 7416 14CD E197 6E88 ED69 5653

Paul Bramscher

2004-05-30, 11:48 am

Jerry Polyak wrote:
> "Alexander Dalloz" <alexander.dalloz@uni-bielefeld.de> wrote in message
> news:pan.2004.05.25.22.31.47.483157@uni-bielefeld.de...
>
>
>
> So your advice amounts to: "Read the manual"? If we all did that and it
> worked 100% of the time, than there would be no use for NG, would there?


It's the unhelpful attitude that is one of the primary obstacles to
Linux achieving total world domination. Nerds think everyone has
unlimited time in the day to read or play around, and see no point in
shortening the learning curve. Evidently, everyone must re-invent the
wheel.

Anyway, Alex is right about one thing -- running mysql can be easy but
it does require a little reading. Once you get mysql up and running for
the first time, I suggest starting it like this afterward. First, login
as root. Then type:

safe_mysqld &

This will run the mysql daemon as a background process (the amperand
character).

Alexander Dalloz

2004-05-30, 11:48 am

On Wed, 26 May 2004 21:27:01 -0500 Paul Bramscher wrote:

> the first time, I suggest starting it like this afterward. First, login
> as root. Then type:
>
> safe_mysqld &
>
> This will run the mysql daemon as a background process (the amperand
> character).


That is done at first start of the mysql daemon by the init script -
invoked by service mysqld start - which checks whether the base database
and tables exist.

And yes, without having read the mysql documentation the user would hardly
know that and how he has to set a root password and how he set permissions
for further database users.

Alexander


--
Alexander Dalloz | Enger, Germany
PGP key valid: made 13.07.1999
PGP fingerprint: 2307 88FD 2D41 038E 7416 14CD E197 6E88 ED69 5653

Matt

2004-05-30, 11:48 am

> > So your advice amounts to: "Read the manual"? If we all did that and it
>
> It's the unhelpful attitude that is one of the primary obstacles to
> Linux achieving total world domination. Nerds think everyone has
> unlimited time in the day to read or play around, and see no point in
> shortening the learning curve. Evidently, everyone must re-invent the
> wheel.


From what I read, Alexander "donated" his time to give this guy some help on
starting his mysql server, something he didn't have to do. He gave the
exact commands required, very helpful information. You say that Nerds think
everyone has unlimited time in the day to read or play around. Do you think
Alexander has unlimited time in the day to explain exactly what has already
been written in a manual? Talk about re-inventing the wheel. Everyone
wants everything given to them, and don't want to do any work to get there.
It upsets me when people that are trying to help, give good advice, and the
person asking for help complains because they didn't give a step by step
process on how to do it. Newsgroups are a resource... They are not a
personal trainer. If someone gives you advice, take that advice
appreciatively, and if it is not enough, research it some more on your own,
or ask a follow up question. Never complain when someone offers you help.
They aren't required to even respond.

Matt


Max Horlicks

2004-05-30, 11:48 am

Jerry Polyak wrote:

> Hi,
>
> I am trying to run mysql on RedHat 9.0. I installed every package under
> SQL
> database & mysql database. But so far I don't think mysql is running.
> When trying to connect to the database using php I get the following
> error: "Can't connect to local mysql server through socket
> '/var/lib/mysql/mysql.sock' (2)" After checking I found that the file
> doesn't exist.
>
> How do I start mysql under RedHat?
>
> What else am I doing wrong?
>
> TIA
>
> Jerry Polyak


In RH9, you just gotta go to the "services" tab from the Start Menu (System
Settings->Server Settings->Services) - look for the mysql service under
Runlevel 6 (GUI) and Start" it.

Lot simpler than stuffing around at cmdline level.

Max



Alan Powell

2004-06-03, 4:51 pm

You need to have a mysql.sock file. On my system it is a zero (0) length
file.

"Jerry Polyak" <jerrypolyakl@nospam.yahoo.com> wrote in message
news:63ded$40b38b67$44a5b497$10303@msgid
.meganewsservers.com...
> Hi,
>
> I am trying to run mysql on RedHat 9.0. I installed every package under

SQL
> database & mysql database. But so far I don't think mysql is running.

When
> trying to connect to the database using php I get the following error:
> "Can't connect to local mysql server through socket
> '/var/lib/mysql/mysql.sock' (2)" After checking I found that the file
> doesn't exist.
>
> How do I start mysql under RedHat?
>
> What else am I doing wrong?
>
> TIA
>
> Jerry Polyak
>
>




Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com