LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-24-2004, 02:20 AM   #1
farhills
LQ Newbie
 
Registered: Nov 2004
Distribution: SuSe 9.2
Posts: 7

Rep: Reputation: 0
MySQL - what do I do now?


Hi

I am a total Newbie to Linux. So far I have managed to get Apache and PHP working and now I am trying to get MySQL installed.

I am running SuSe 9.2 and have selected and installed the relevant MySQL server and client apps.

When I try to set the root password using mysqladmin I get the error message:

'Cant connect to local MySQL server through socket '/var/lib/mysql/mysql.sock (2)'

When I check the directory above there is no file 'mysql.sock'. There is however a directory below mysql also called mysql ie '/var/lib/mysql/mysql/' but this also doesn't contain mysql.sock.

Can anyone suggest what I need to do to get MySQL up and running and also how to start up a user friendly graphical interface for admin purposes?

Many thanks
 
Old 11-24-2004, 02:48 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Hi

That error generally means you don't have MySQL running. Generically:
/sbin/mysqld

Should start the daemon, however, you probably have an init script of some sort, maybe a:
/etc/init.d/mysql start
Will do the trick, depends on how your distro sets that up.

As for a "GUI" I'd probably guess you will want to use PHPMyAdmin which runs through the browser for your MySQL admin needs, you can also look at webmin, but I think generally people use PHPMyAdmin a bit more often.

Cool
 
Old 11-24-2004, 02:49 AM   #3
hutuworm
Member
 
Registered: Aug 2004
Posts: 130

Rep: Reputation: 15
Modify /etc/my.cnf :

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
 
Old 11-24-2004, 04:00 AM   #4
farhills
LQ Newbie
 
Registered: Nov 2004
Distribution: SuSe 9.2
Posts: 7

Original Poster
Rep: Reputation: 0
Hi

Thanks for the advice. So far no luck I am afraid. I tried the following:

/etc/init.d/mysql start gave an error "ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)"

/usr/sbin/mysqld gae an error "Fatal error: Please read Security section of the manual to find out how to run mysqld as root!"

I have not yet tried edditing my.cnf. I will try that next.

Regards
 
Old 11-24-2004, 04:33 AM   #5
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Did you ever run:
mysql_install_db

However your distro tells you to? Here's the generic instructions if you were to install from a tarball:
http://dev.mysql.com/doc/mysql/en/Po...tallation.html

Cool
 
Old 11-24-2004, 05:22 AM   #6
farhills
LQ Newbie
 
Registered: Nov 2004
Distribution: SuSe 9.2
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by MasterC
Did you ever run:
mysql_install_db

However your distro tells you to? Here's the generic instructions if you were to install from a tarball:
http://dev.mysql.com/doc/mysql/en/Po...tallation.html

Cool
Hi

I did run mysql_install_db as instructed in the manual. From memory it said something about installing all prepared tables and then mysqld - shutdown complete.

I have just run the program called mysqltest in usr/bin which "failed in mysql_real_connect(): Can't connect to local MySQL server through socket /var/lib/mysql/mysql.sock"

Still flailing around trying to find out what is wrong. Maybe I should uninstall and try again?

Regards
 
Old 11-24-2004, 09:50 AM   #7
farhills
LQ Newbie
 
Registered: Nov 2004
Distribution: SuSe 9.2
Posts: 7

Original Poster
Rep: Reputation: 0
Hi

I did the usual software engineer's trick of uninstalling the packages, rebooting and reinstalling them. Guess what - MySQL is now up and runing.

Thanks for all your help and advice.

Regards
 
Old 11-27-2004, 01:11 PM   #8
Hattori
LQ Newbie
 
Registered: Nov 2004
Posts: 2

Rep: Reputation: 0
mysql.sock

I've got the same problem. "in SUSE 9.2 under 9.1 it worked just fine."
Can you tell me witch files you reinstalled.
And did you do this with yast, with update or realy delete.
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:31 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
Open Source Consulting | Domain Registration