Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
07-09-2003, 03:57 AM
|
#1
|
Member
Registered: Feb 2002
Distribution: Slack 10.1
Posts: 215
Rep:
|
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.
|
|
|
07-09-2003, 04:06 AM
|
#2
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
What steps?  Could you explain what steps you've taken so far?
Cool
|
|
|
07-09-2003, 04:32 AM
|
#3
|
Member
Registered: Feb 2002
Distribution: Slack 10.1
Posts: 215
Original Poster
Rep:
|
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
|
|
|
07-09-2003, 04:35 AM
|
#4
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
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
|
|
|
07-09-2003, 04:59 AM
|
#5
|
Member
Registered: Feb 2002
Distribution: Slack 10.1
Posts: 215
Original Poster
Rep:
|
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#
|
|
|
07-09-2003, 05:02 AM
|
#6
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
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
|
|
|
07-09-2003, 05:58 AM
|
#7
|
Member
Registered: Feb 2002
Distribution: Slack 10.1
Posts: 215
Original Poster
Rep:
|
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?
|
|
|
07-09-2003, 07:25 AM
|
#8
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
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
|
|
|
07-09-2003, 07:52 AM
|
#9
|
Member
Registered: Feb 2002
Distribution: Slack 10.1
Posts: 215
Original Poster
Rep:
|
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
|
|
|
07-09-2003, 08:49 AM
|
#10
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
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
|
|
|
07-10-2003, 07:22 AM
|
#11
|
Member
Registered: Feb 2002
Distribution: Slack 10.1
Posts: 215
Original Poster
Rep:
|
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#
|
|
|
07-10-2003, 08:40 AM
|
#12
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
You didn't look closely.. the command safe_mysql has a d on the end:
safe_mysqld &
|
|
|
07-10-2003, 08:53 AM
|
#13
|
Member
Registered: Feb 2002
Distribution: Slack 10.1
Posts: 215
Original Poster
Rep:
|
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#
|
|
|
07-10-2003, 09:05 AM
|
#14
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
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.
|
|
|
07-10-2003, 09:14 AM
|
#15
|
Member
Registered: May 2003
Location: NC, USA
Distribution: Slackware 14.0
Posts: 94
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 10:43 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|