LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-08-2003, 11:00 PM   #1
WorldBuilder
Member
 
Registered: Mar 2003
Location: Massachusetts, USA
Distribution: RH 8, Solaris, Windoze eXPunged
Posts: 520

Rep: Reputation: 30
MySQL installation, killing me... Please help!


Hi all,

I have installed MySQL onto my RH 8 box from source. Here's what I did...

./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/sbin --localstatedir=/var/lib/mysql --with-mysql-user=mysql --enable-thread-safe-client --without-debug --without-bench &&
make &&
make install

All that went fine. Then, I ran:

mysql_install_db &&
chown -R mysql:mysql /var/lib/mysql

Next:

mysqld_safe 2>&1 >/dev/null &

Next:

mysql -uroot mysql which gave me:

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

Next:

mysqld &

Gave me:

[2] 16931
[root@goliath mysql-4.0.12]# Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
030608 23:25:54 Aborting

030608 23:25:54 mysqld: Shutdown Complete

Next:


mysqld_safe

Gave me:

Starting mysqld daemon with databases from /usr/var
030608 23:26:41 mysqld ended

Next:

ps -auxw | grep mysqld

Gives me:

root 1118 0.0 0.0 3276 628 pts/0 S 23:59 0:00 grep mysqld


Ok, bottom line. I do NOT know anything about MySQL. A friend of mine told me I wanted it to do some web stuff I wanna do, and I think he's right. He does not know what's going on and why this is not working. Could anyone please tell me how to get this up and running with PHP and apache integration? I would be eternally grateful! Thanks a million!!!

Chris

PS. And, please, don't be afraid to treat me like an idiot on this one. Like I said, MySQL = Greek to me!
 
Old 06-09-2003, 01:11 AM   #2
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
did you leave out mysql_install_db

try that before running the server. i forgot exactly how to run it
but im sure it needs to be run at some point. i think that
is the command that sets up the mysql database and the test
database (the mysql database is VERY important).
 
Old 06-09-2003, 08:33 AM   #3
WorldBuilder
Member
 
Registered: Mar 2003
Location: Massachusetts, USA
Distribution: RH 8, Solaris, Windoze eXPunged
Posts: 520

Original Poster
Rep: Reputation: 30
Thanks for the reply. Yes, if you look in my original post, I already ran that. Can anyone thing of anything else? I can't even find info on Google about why this is not working. I really need to get this running! Thank you!!

Chris
 
Old 06-09-2003, 11:21 AM   #4
WorldBuilder
Member
 
Registered: Mar 2003
Location: Massachusetts, USA
Distribution: RH 8, Solaris, Windoze eXPunged
Posts: 520

Original Poster
Rep: Reputation: 30
Also, I am still trying to work on this on my own, and I have found out something interesting. When I run the command:

/usr/bin/mysqladmin -u root password 'new-password'

I get the following output:

/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!

Well, mysqld is not running, but I checked on the /tmp/mysql.sock file anyway and it says:

mysql.sock: No such device or address

What it all mean, Basil?!?! lol

Please help!

Chris
 
Old 06-09-2003, 03:41 PM   #5
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
the server has to be running for mysqladmin to work, when
u run it the sock file is created for you (or somethin like that). Youshould
have to mess with that.

Last edited by Robert0380; 06-09-2003 at 03:43 PM.
 
Old 06-09-2003, 04:34 PM   #6
cyberskye
Member
 
Registered: Feb 2003
Location: The City by the Bay
Posts: 116

Rep: Reputation: 15
Quote:
Also, I am still trying to work on this on my own, and I have found out something interesting. When I run the command:

/usr/bin/mysqladmin -u root password 'new-password'

I get the following output:
mysqladmin needs to have the server running. mysql.sock will be there when mysqld is running.
 
Old 06-09-2003, 04:39 PM   #7
cyberskye
Member
 
Registered: Feb 2003
Location: The City by the Bay
Posts: 116

Rep: Reputation: 15
Quote:
mysql -uroot mysql which gave me:
you need a space between "-u" and "root" - is that how you ran it?

You need to change ownership of the working directory -

chown -R mysql:mysql /usr/mysqlxxx

Skye
 
Old 06-09-2003, 04:41 PM   #8
cyberskye
Member
 
Registered: Feb 2003
Location: The City by the Bay
Posts: 116

Rep: Reputation: 15
You read the warnings about source compiles on RH systems, right? You might wanna just go with the binary.
 
Old 06-10-2003, 07:24 AM   #9
WorldBuilder
Member
 
Registered: Mar 2003
Location: Massachusetts, USA
Distribution: RH 8, Solaris, Windoze eXPunged
Posts: 520

Original Poster
Rep: Reputation: 30
Thanks guys. I figured it out. It was a user problem... I just had to reinstall the sourse after deleting and properly re-adding the mysql user... Simple. I figured it was something stupid!

Chris
 
  


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
mysql-installation: Not enough space in /var/lib/mysql/ linus123 Linux - Software 8 11-10-2006 02:19 PM
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 3.23.58-14 installation prolem - mysql.sock not found lightcom Linux - Software 4 02-23-2005 12:46 AM
driver installation problem-it is killing me clarity Linux - Software 0 09-23-2004 07:35 PM
php4 mysql, installation, php-pages with mysql info stay empty dnla Linux - Software 2 03-14-2004 02:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:59 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