Installed 12.04 LAMP phpmyadmin and all is well. Actually starting to like Unity after playing with it for a while. Not getting what all the fuss is about.
Need to change the database directory. Ran though all the changes made done in 10.04 but not working. When trying to log into mysql using the terminal gettingWhen trying to start mysql, sudo service mysql start, get Start: Job failed to start. So mysql is definately not running. Restored apparmor.d/usr.sbin.mysqld, my.cnf, back to my backup of the origals thenERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
sudo /etc/init.d/apache2 restart
sudo /etd/init.d/apparmor.d reload
sudo service mysql start
and all works fine again. Has to be a settings thing.
Did a sudo cp -Pr /var/lib/mysql /MyDrive/Databases
Which didn't actually keep all the permissions straight so
sudo chown -r mysql:mysql /MyDrive/Databases
sudo chmod -r 770 /MyDrive/Databases
and checked using Nautilus
Did some homework and found a few entries talking about the server host is not set. Added in /etc/apache2/http.conf the line "ServerName 127.0.0.1". This works fine with the original files but again not with my changes which are as follows;
apparmor.d usr.sbin.mysqld
my.cnfCode:/usr/sbin/mysqld { #include <abstractions/base> #include <abstractions/nameservice> #include <abstractions/user-tmp> #include <abstractions/mysql> #include <abstractions/winbind> capability dac_override, capability sys_resource, capability setgid, capability setuid, network tcp, /etc/hosts.allow r, /etc/hosts.deny r, /etc/mysql/*.pem r, /etc/mysql/conf.d/ r, /etc/mysql/conf.d/* r, /etc/mysql/*.cnf r, /usr/lib/mysql/plugin/ r, /usr/lib/mysql/plugin/*.so* mr, /usr/sbin/mysqld mr, /usr/share/mysql/** r, /var/log/mysql.log rw, /var/log/mysql.err rw, # /var/lib/mysql/ r, //comment out original 2 lines comments only for here not in file on machine. # /var/lib/mysql/** rwk, /MyDisk/Databases/ r, // added these two in, again no comments in real file /MyDisk/Databases/** rwk, /var/log/mysql/ r, /var/log/mysql/* rw, /var/run/mysqld/mysqld.pid w, /var/run/mysqld/mysqld.sock w, /run/mysqld/mysqld.pid w, /run/mysqld/mysqld.sock w, /sys/devices/system/cpu/ r, # Site-specific additions and overrides. See local/README for details. #include <local/usr.sbin.mysqld> }
httpd.configCode:[client] port = 3306 socket = /var/run/mysqld/mysqld.sock # Here is entries for some specific programs # The following values assume you have at least 32M ram # This was formally known as [safe_mysqld]. Both versions are currently parsed. [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] # # * Basic Settings # user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr # datadir = /var/lib/mysql datadir = /MyDisk/Databases tmpdir = /tmp:/kar3/sqlout lc-messages-dir = /usr/share/mysql skip-external-locking
Also tried as suggested in another post to make a file/var/run/mysqld/mysqld.sock change the permissions, etc. and got:Code:ServerName 127.0.0.1
which lead to another round of searching with no results.Code:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
All worked with just changes to my.cnf and apparmor.d /usr.sbin.mysqld with 10.04. What am I missing?
Thqanks
Ed



Adv Reply

Bookmarks