LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-23-2003, 03:05 AM   #1
Hollywood W
LQ Newbie
 
Registered: Feb 2003
Distribution: Red Hat 8.0
Posts: 27

Rep: Reputation: 15
MySQL


Went to mysql.com and downloaded mysql 4.0 the recommended download. I downloaded the tar.gz file and untared it then did ./configure, make, make install....

ok what am I supposed to do next? I tried to executing mysql by typing:
mysql at the prompt and I get a funky message saying:

[wpei@localhost wpei]$ mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[wpei@localhost wpei]$

Help would be greatly appreciated...
 
Old 05-23-2003, 03:37 AM   #2
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
You need to create the permission tables and other fun stuff before you can do anything with it. It's in the documentation... somewhere It's a simple enough script that automates it for you.

There's also a script for starting the mysqld/safe_mysqld process.

Keep reading you're almost there.
 
Old 05-23-2003, 05:05 AM   #3
Hollywood W
LQ Newbie
 
Registered: Feb 2003
Distribution: Red Hat 8.0
Posts: 27

Original Poster
Rep: Reputation: 15
Are you talking about this documentation?

http://www.mysql.com/documentation/m...ry_notes-Linux

Been reading it over and over again and doesn't seem to be written for regular Joe's like myself.
 
Old 05-23-2003, 05:12 AM   #4
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
I think he's talking about http://www.mysql.com/doc/en/Post-installation.html which steps you through making the basic permissions database. Note that you have to start the server before you can do this with "mysqld_safe &".

HTH

Jamie...
 
Old 05-23-2003, 06:47 AM   #5
cyber
Member
 
Registered: Feb 2003
Location: Sweden
Distribution: RedHat Linux 8.0
Posts: 43

Rep: Reputation: 15
try this:

shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> scripts/mysql_install_db
shell> chown -R root /usr/local/mysql
shell> chown -R mysql /usr/local/mysql/var
shell> chgrp -R mysql /usr/local/mysql
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> /usr/local/mysql/bin/safe_mysqld --user=mysql &
or
shell> /usr/local/mysql/bin/mysqld_safe --user=mysql &
if you are running MySQL 4.x.
 
Old 05-24-2003, 04:59 AM   #6
Hollywood W
LQ Newbie
 
Registered: Feb 2003
Distribution: Red Hat 8.0
Posts: 27

Original Poster
Rep: Reputation: 15
Went to: http://www.mysql.com/doc/en/Post-installation.html
and got up to:

[root@localhost mysql-4.0.13]# ./bin/mysqld_safe --user=mysql &
[1] 4173
[root@localhost mysql-4.0.13]# bash: ./bin/mysqld_safe: No such file or directory

[1]+ Exit 127 ./bin/mysqld_safe --user=mysql

This doesn't make any sense to me 'cus I have no idea what I'm doing at this point, all I know is it's supposed to set me up to start using mysql with a test table.

Please help poor me. All I know how to do is run SQL commands. And use JDBC to access an already setup mysql.

This is not easy...
 
Old 05-24-2003, 05:14 AM   #7
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
if you built and installed (or your package manager placed) mysql in /usr/local/mysql then you might want to try the full path name to mysqld_safe.
Code:
/usr/local/mysql/bin/mysqld_safe --user=mysql
Try a 'find /usr -name mysqld_safe' and see where it placed the startup script. Then run the startup with the full path name.
 
Old 05-24-2003, 06:27 AM   #8
Hollywood W
LQ Newbie
 
Registered: Feb 2003
Distribution: Red Hat 8.0
Posts: 27

Original Poster
Rep: Reputation: 15
now I get:

[wpei@localhost scripts]$ mysqld_safe --user=mysql
Starting mysqld daemon with databases from /var/lib/mysql
/usr/local/bin/mysqld_safe: line 277: /var/log/mysqld.log: Permission denied
rm: cannot remove `/var/lib/mysql/mysql.sock': Permission denied
/usr/local/bin/mysqld_safe: line 283: /var/log/mysqld.log: Permission denied
tee: /var/log/mysqld.log: Permission denied
030524 06:25:17 mysqld ended
tee: /var/log/mysqld.log: Permission denied

why don't I have privledges? if I switch to root this is what I get:

[root@localhost scripts]# mysqld_safe user=mysql
Starting mysqld daemon with databases from /var/lib/mysql
030524 06:27:18 mysqld ended

[root@localhost scripts]#

what good is it if the damm thing connects then quits immediately?
 
Old 05-24-2003, 10:25 AM   #9
chenggg
LQ Newbie
 
Registered: May 2003
Posts: 1

Rep: Reputation: 0
i still don't understand.
 
  


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
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 03:13 PM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 08:19 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 02:52 AM
Problems with MySQL on SuSE: Can't Connect (/var/lib/mysql/mysql.sock) neocookie Linux - Software 8 02-08-2008 12:48 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 09:44 AM


All times are GMT -5. The time now is 06:30 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration