LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-09-2003, 03:57 AM   #1
digital bots
Member
 
Registered: Feb 2002
Distribution: Slack 10.1
Posts: 215

Rep: Reputation: 30
Slackware and mysql


Hey guys i was following along these steps i have here to installing a mysql database to my slackware box. I am at the step now where i need to run mysql and i get this error.
mysql@Trigun:/usr/local/mysql/data$ mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (111)
mysql@Trigun:/usr/local/mysql/data$

When i go to '/var/run/mysql/' I dont even see any files in this dir. Does this mean i did not install everything correctly. Also if you need the in which i took for this is needed i can upload the pdf i was using.
 
Old 07-09-2003, 04:06 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
What steps? Could you explain what steps you've taken so far?

Cool
 
Old 07-09-2003, 04:32 AM   #3
digital bots
Member
 
Registered: Feb 2002
Distribution: Slack 10.1
Posts: 215

Original Poster
Rep: Reputation: 30
ok here is what i did all of this i did as root

$ cp mysql-standard-4.0.13-pc-linux-i686 /usr/local
$ cd /usr/local
$ tar -zxvf mysql-standard-4.0.13-pc-linux-i686

$ ln -s mysql-standard-4.0.13-pc-linux-i686 mysql

$ cd /usr/local
$ chown -R mysql:root mysql-standard-4.0.13-pc-linux-i686 mysql

$ su mysql
$ cd mysql
$ scripts/mysql_install_db
$ exit

$ cd /etc/rc.d
$ cp /usr/local/mysql/support_files/mysql.server mysql
$ chmod +x mysql

and this part didnt work because slackware doesnt have a chkconfig so i think this is where it could have gone wrong

$ /sbin/chkconfig --del mysql
$ /sbin/chkconfig --add mysql

$ mysql

and then i got that error
 
Old 07-09-2003, 04:35 AM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Yep

You will want to have mysql running first, so since you copied that script to /etc/rc.d you can start it with:
/etc/rc.d/mysql start
And after that, try connecting again.

Post back if you still have errors.

Cool
 
Old 07-09-2003, 04:59 AM   #5
digital bots
Member
 
Registered: Feb 2002
Distribution: Slack 10.1
Posts: 215

Original Poster
Rep: Reputation: 30
i get this now

harold@Trigun:~$ su root
Password:
root@Trigun:/home/harold# /etc/rc.d/mysql start
root@Trigun:/home/harold# Starting mysqld daemon with databases from /usr/local/mysql/data
030709 05:59:05 mysqld ended
tee: /usr/local/mysql/data/Trigun.err: No space left on device

tee: /usr/local/mysql/data/Trigun.err: No space left on device

root@Trigun:/home/harold# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (111)
root@Trigun:/home/harold#
 
Old 07-09-2003, 05:02 AM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
You need to figure out why mysql is ending so abruptly, judging from those errors, you are short on space

Look at df -h to find out for sure.

Cool
 
Old 07-09-2003, 05:58 AM   #7
digital bots
Member
 
Registered: Feb 2002
Distribution: Slack 10.1
Posts: 215

Original Poster
Rep: Reputation: 30
root@Trigun:/home/harold# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda5 7.3G 2.1G 4.9G 30% /
/dev/hda1 45M 46M 0 100% /usr/local
root@Trigun:/home/harold#

yup i am outta space in my local users area. Is there anyway around this?
 
Old 07-09-2003, 07:25 AM   #8
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Yes, of course

You could install mysql elsewhere, maybe /usr/mysql since / has enough space that might be worth trying.

You will need/want to edit the startup script, and probably need to edit mysql_install_db as well to the new location. Re-do the install, make sure everything goes well, and then try starting it again.

Cool
 
Old 07-09-2003, 07:52 AM   #9
digital bots
Member
 
Registered: Feb 2002
Distribution: Slack 10.1
Posts: 215

Original Poster
Rep: Reputation: 30
ok i fixed the size problem

mysql@Trigun:/var/run/mysql$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda5 7.3G 2.1G 4.9G 30% /
/dev/hda1 45M 34M 9.6M 78% /usr/local
mysql@Trigun:/var/run/mysql$

but i still get the same here is what i did.

mysql@Trigun:/var/run/mysql$ /etc/rc.d/mysql start
mysql@Trigun:/var/run/mysql$ Starting mysqld daemon with databases from /usr/local/mysql/data
030709 08:50:33 mysqld ended


mysql@Trigun:/var/run/mysql$ mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (111)
mysql@Trigun:/var/run/mysql$

i even chmoded the mysql folder to 777 and it still gives me this error. I will check on google to see if some one has a mock mysql.sock i can import into this folder. But if some one knows the answer to why i am getting this please let me know :-D
 
Old 07-09-2003, 08:49 AM   #10
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by digital bots
mysql@Trigun:/var/run/mysql$ /etc/rc.d/mysql start
mysql@Trigun:/var/run/mysql$ Starting mysqld daemon with databases from /usr/local/mysql/data
030709 08:50:33 mysqld ended


mysql@Trigun:/var/run/mysql$ mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (111)
mysql@Trigun:/var/run/mysql$

i even chmoded the mysql folder to 777 and it still gives me this error. I will check on google to see if some one has a mock mysql.sock i can import into this folder. But if some one knows the answer to why i am getting this please let me know :-D
You have to have it running with no errors before trying to connect to it.

Try:

chown -R mysql.mysql /var/run/mysql
safe_mysqld &

Then if it doesn't error out.. you can connect to the database with:

mysql
 
Old 07-10-2003, 07:22 AM   #11
digital bots
Member
 
Registered: Feb 2002
Distribution: Slack 10.1
Posts: 215

Original Poster
Rep: Reputation: 30
Still nothing i dont think my pc likes me.

root@Trigun:/var/run# chown -R mysql.mysql /var/run/mysql
root@Trigun:/var/run# safe_mysql &
[1] 2741
root@Trigun:/var/run# bash: safe_mysql: command not found

[1]+ Exit 127 safe_mysql
root@Trigun:/var/run# /etc/rc.d/mysql start
root@Trigun:/var/run# Starting mysqld daemon with databases from /usr/local/mysql/data
030710 08:21:17 mysqld ended


root@Trigun:/var/run# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (111)
root@Trigun:/var/run#
 
Old 07-10-2003, 08:40 AM   #12
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
You didn't look closely.. the command safe_mysql has a d on the end:

safe_mysqld &
 
Old 07-10-2003, 08:53 AM   #13
digital bots
Member
 
Registered: Feb 2002
Distribution: Slack 10.1
Posts: 215

Original Poster
Rep: Reputation: 30
same thing i have done this like 3 times before on other machines and i never got any errors. Could it be the version of mysql database i am using?

root@Trigun:/var/run# safe_mysqld &
[1] 4634
root@Trigun:/var/run# Starting mysqld daemon with databases from /var/lib/mysql
030710 09:51:59 mysqld ended


[1]+ Done safe_mysqld
root@Trigun:/var/run# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (111)
root@Trigun:/var/run#
 
Old 07-10-2003, 09:05 AM   #14
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
What do your logs tell you in why it keeps ending after attempting to start? Do you have any databases in /var/lib/mysql ?? Have you tried removing any of them and redoing the steps:

mysql_install_db
chown -R mysql.mysql /var/lib/mysql
safe_mysqld &

And there is no use in trying to connect with the mysql command until you actually getting it to run, that will keep giving an error til you can actually run the safe_mysqld command.
 
Old 07-10-2003, 09:14 AM   #15
naflan
Member
 
Registered: May 2003
Location: NC, USA
Distribution: Slackware 14.0
Posts: 94

Rep: Reputation: 15
This is how I got mysql working thanks to initself
Set permissions on MySQL files:

# cd /var/lib
# chown -R mysql:root mysql
# su mysql
$ mysql_install_db
$ safe_mysqld --user=mysql & [hit enter once the db loads]
$ exit
# mysqladmin -u root status [verify the database is running]

Add MySQL to startup scripts::

# vi /etc/rc.d/rc.local
echo Starting MySQL server:
safe_mysqld &
sleep 2

see post
 
  


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
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
Slackware 10 MySQL kdepa Linux - Software 1 01-20-2005 02:13 AM
Slackware 9.1 - Mysql fuelinjection Linux - General 2 06-10-2004 06:26 AM
Slackware + MySQL stuart39 Slackware 5 10-07-2003 03:37 PM
MySQL on slackware hing Slackware 2 01-25-2003 03:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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