Linux - SoftwareThis 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
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.
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.
i have been trying to install MySQL on my companies system for some time now and have not been successful
I have tried installing various different versions and it seems its all a little messy, ive tried to remove MySQL the best i can by doing a "whereis mysql" and then using "rm -rf" to remove them accordingly.
When i try installing MySQL, it says MySQL may currently be running because the port is in use. I've also ran "grep mysql /etc/services" and it has listed the 2 MySQL services on 3306, udp and tcp.
If someone could help me to completely remove MySQL (Services etc) and then a step-by-step guide of how to install it again that would be great and would be really appreciated.
How did you install it, with your distro's packaging system or manually from a source tarball? If the former, then your package manager should have a command to uninstall it; if the latter (via 'make install'), then there should be some sort of 'make uninstall' syntax - check the makefile.
It wont uninstall properly because i removed certain files. I believe everything is removed now, however the services still seem to be running and when i try to stop them it i get an error, something about a PID file.
Is there anyway of forcing services to end or something ?
I have tried installing various different versions and it seems its all a little messy, ive tried to remove MySQL the best i can by doing a "whereis mysql" and then using "rm -rf" to remove them accordingly.
Using rm -rf may actually have caused more problems because it appears like you did not remove the whole installation by doing that. Anyway how did you install it and what distribution are you using. Also what files did you remove? Its best to provide as much info as possible in your initial post to help others know exactly what your problem is.
In linux, services are either processes or started by inetd. Do 'ps ax | grep sql' and see if there's any sql process running. If there is, kill it as above; if not then it's started by inetd, and you need to comment out the line in inetd.conf (I forget exactly what that file is called) and then send inetd SIGHUP to tell it to reread its configuration file.
I just removed the /bin/mysql and the /sbin/mysql
I dont know much about my companies distro etc, however i believe its Red Hat because i can use RPM (never used it without errors hehe).
Sorry for not being able to provide everything, but if you could provide me with a list of things to try, then that would be great too.
Many distros use RPM (although RH originally designed it). If you installed via 'rpm xxxx' then read the rpm docs to see how to uninstall it. Did you try the ps command I suggested earlier?
Any software installed via rpm should be uninstalled using rpm. Deleting essential individual files will cause you problems when it comes to uninstalling the whole package (this is because the mysql stuff is installed into various directories even though its shipped in one or two packages). Anyway, what are the results of running
Code:
#rpm -qa | grep -i mysql
You can also find out what distro you are using by doing
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.