Web Hosting Talk







View Full Version : Shell command on raq3


Mike343
09-09-2001, 11:11 PM
On my raq3 in shell i would like to delete a directory which is named mysql but, when i try rmdir /the directorty, it says directory not empty now i can delete the files one by one with rm /path to file but, i would just like to delete the whole directory instead of the files one by one. Does anyone know how too do this?

CmptrWz
09-09-2001, 11:31 PM
I believe that there is a recursive parameter on the rm function.
Try typing in
rm --help
to see all the options for it.

ljprevo
09-10-2001, 12:44 AM
rm -r mysql

Be careful and make sure you don't want to loose anything in that directory

Mike343
09-10-2001, 03:18 AM
ok i deleted mysql and installed the package file from cobalt of mysql and in shell i try to start the mysql sserver

[root@www admin]# /etc/rc.d/init.d/mysql start
[root@www admin]# Starting mysqld daemon with databases from /home/mysql
rm: /var/lib/mysql/mysql.sock: is a directory
010910 01:07:17 mysqld ended

and after that i try to change the defualt password and this happens

[root@www admin]# mysqladmin -uroot password mypass
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!

anyone have any idea on how to fix this annoying problem?

FireFoz
09-10-2001, 04:20 AM
When you start MySQL, MySQL places a file named "mysql.sock' in /var/lib/mysql/, or in the standard dir /tmp/.
Now since you deleted MySQL, it can not run, and so it can not place the file, and so you cant connect to it :) (since you have to connect to mysql thru that file)

If you want to resolve the problem, you probably have to reinstall mysql.

FireFoz
09-10-2001, 04:20 AM
why did you delete it anyway?

Mike343
09-10-2001, 11:10 AM
I deleted a mysql tarball that i installed and it was giving my the same error so i deleted it and tried cobalts mysql pakcage and it is doign the same thing, any idea's? i have unistalled cobalts mysql package about 3 times and reinstalled it the same, still no succes

madsere
09-10-2001, 04:45 PM
Did you try the obvious "rm -r /var/lib/mysql/mysql.sock" ?