LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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-16-2004, 09:06 PM   #16
cyberjaya
LQ Newbie
 
Registered: Aug 2004
Posts: 2

Rep: Reputation: 0

Quote:
Originally posted by krilen
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
hi krilen, i met exactly same problem, can u explain more detail on how u solve it?
how to change the /usr/local/var to mysql owner and group


error return

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

i did read MySQL manual it says

"Once you've installed MySQL (from either a binary or source distribution), you need to initialise the grant tables, start the server, and make sure that the server works okay."


and when i execute mysql_install_db in my /usr/bin/
it returns error

Didn't find /usr/libexec/mysqld
You should do a 'make install' before executing this script

well then i try to find my mysqld. i can't find it,
the things is like

[root@pan bin]# whereis mysqld
mysqld: /usr/share/man/man1/mysqld.1.gz

then i did

[root@pan bin]# mysql_config
Usage: /usr/bin/mysql_config [OPTIONS]
Options:
--cflags [-I'/usr/include']
--libs [-L'/usr/lib/mysql' -lmysqlclient -lz -lcrypt -lnsl -lm] --socket [/var/lib/mysql/mysql.sock]
--port [3306]
--version [3.23.58]


i did mysqld_safe and safe_mysqld and mysqld and mysqladmin, all return error as "command not found"

i fresh installed fedora core 1, choose mysql installed as defualt,
anyone can help me on this.

thank you very much
 
Old 08-17-2004, 05:46 AM   #17
krilen
Member
 
Registered: Mar 2004
Distribution: CentOS, FreeBSD
Posts: 42

Original Poster
Rep: Reputation: 15
Hi.

Since I did the installation from source and not from the default installation my anwser might not be correctly right for your situation but here I go.

All of this is done by root:

After the installation I ran this program:
/usr/local/bin/mysql_install_db (to install the basic databases)

Then I created the user mysql and group mysql.

Then I should have changed the databases to be owned by mysql (user and group) but this is the part that I forgot and created my error.

But when I ran in /usr/local:
chown -R mysql.mysql var (my databases is located in var, /usr/local/var/)

Then I could start mysql without problem:
/usr/local/bin/mysqld_safe --user=mysql &

And if I type mysql I get the mysql prompt.

I hope this will help you.

If you have any other question let me know.

/Krilen
 
Old 08-25-2004, 01:39 AM   #18
cyberjaya
LQ Newbie
 
Registered: Aug 2004
Posts: 2

Rep: Reputation: 0
ok i share my answer here, i went to /usr/local/bin/ this folder and run the mysql_db_install. so it returns error. then i cd to / then i run usr/local/bin/mysql_install_db , it started to install, and work perfectly.

then when i try to went mysqld in /usr/libexec/ it turns error something like " refer security section of the manual to know how to run mysql as root" and bla bla.
again i am d@mn confused.

i search around all kinds of forums, eventually i saw a line " u can not start mysql service when u login as root"
then ok , fine

su mysql , and run /usr/libexec/mysqld , BINGO~! IT WORKED AT LAST~!! SO HAPPY ~!

i don;t know the exact gimmick behind, but i made it work, hope this help people who review this post later.

thank u krilen as well.
 
  


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
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 01:50 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