LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   default mysql debian.cnf contents Ubuntu 15.10 (https://www.linuxquestions.org/questions/linux-software-2/default-mysql-debian-cnf-contents-ubuntu-15-10-a-4175561554/)

bmrzmr2 12-15-2015 06:12 PM

default mysql debian.cnf contents Ubuntu 15.10
 
I a very newbie to Ubuntu I was installing a LAMP stack on my brand new laptop and miss read something. And without thinking did not save a copy of the default /etc/mysql/debian.cnf. I remember it having a socket = line in it which for a stupid reason I removed but didn't save a backup. And now I can remember what the exact line was.

The result is I can't login to MySql and updates don't work.

Would someone please post an example of a default debian.cnf install.

Thanks in advance,
Roy

berndbausch 12-15-2015 07:03 PM

You could save your changes and just purge and install MySQL.

bmrzmr2 12-15-2015 07:17 PM

Not sure how to purge. Think I understand apt-get install but not sure about dependencies

berndbausch 12-15-2015 07:48 PM

Quote:

Originally Posted by bmrzmr2 (Post 5464835)
Not sure how to purge. Think I understand apt-get install but not sure about dependencies

Use dpkg; it won't bother with dependencies. From the man page:
Quote:

-r, --remove, -P, --purge package...|-a|--pending

Remove an installed package. -r or --remove remove everything except conffiles. This may avoid having to reconfigure the package if it is reinstalled later. (Conffiles are configuration files that are listed in the DEBIAN/conffiles control file). -P or --purge removes everything, including conffiles. If -a or --pending is given instead of a package name, then all packages unpacked, but marked to be removed or purged in file /var/lib/dpkg/status, are removed or purged, respectively. Note: some configuration files might be unknown to dpkg because they are created and handled separately through the configuration scripts. In that case, dpkg won't remove them by itself, but the package's postrm script (which is called by dpkg), has to take care of their removal during purge.
Or move your config file away and run apt-get install with the --reinstall option.

bmrzmr2 12-16-2015 02:00 PM

I might have missed a step but this command "fixed" mysql : sudo apt-get install --reinstall mysql-server-5.6

But then would get "ERROR 1524 (HY000): Plugin 'unix_socket' is not loaded" when trying to login in to mysql.

Did a Google search for that error message and came up with
http://askubuntu.com/questions/70545...-socket/705466

Followed the steps listed and now can login to mysql.

Habitual 12-16-2015 02:10 PM

Glad it worked out. Good job and well done.


All times are GMT -5. The time now is 05:24 AM.