[15:43] <delinquentme> alllriight
[15:43] <delinquentme> soo how do I launch mysql w upstart?
[16:16] <delinquentme> how can I check to see that its installed
[16:16] <delinquentme> a google on " check upstart ubuntu 10.04 version " gave me nada
[16:28] <SpamapS> delinquentme: sudo apt-get install mysql-server should be sufficient
[16:28] <SpamapS> delinquentme: or did you mean something else?
[16:29] <delinquentme> SpamapS, seems that doesn't configure things correctly =/   I'm trying to figure out if mysql is running ( sudo netstat -tap | grep mysql )
[16:30] <delinquentme> ... this is what the manpage says to do ...and the command simply hangs
[16:37] <SpamapS> delinquentme: service mysql status should show something like 'start/running, pid 9999
[16:41] <delinquentme> SpamapS, it gives me " mysql start/running "
[16:44] <delinquentme> I mean thats not behaving correctly is it?
[16:44] <SpamapS> delinquentme: no, if there is no pid listed, then something has gone wrong
[16:45] <delinquentme> So how do I check that im actually running on upstart?
[16:46] <SpamapS> delinquentme: what OS are you running?
[16:47] <delinquentme> ubuntu 10.04
[16:48] <SpamapS> delinquentme: ok, you are definitely "on upstart".. 10.04 will not work any other way.
[16:48] <SpamapS> delinquentme: as far as mysql, have you modified /etc/init/mysql.conf in any way?
[16:51] <delinquentme> I have, i have backups... but the issue predates the changes made
[16:52] <SpamapS> delinquentme: and the issue is... ?
[16:53] <SpamapS> delinquentme: has it always said "start/running" but not actually made mysqld run?
[16:53] <delinquentme> mysql.sock is not being created
[16:55] <joppla> hi, I need a little help figuring out some upstart quirks
[16:56] <joppla> I have an upstart script that I start on networking and this works fine so far, but for some reason as soon as script is finished, it initiates stop, which should only be called on runlevel [!2345]
[16:57] <joppla> do i need to have a service running for upstart to not call stop on a script? (the job is not defined as a task)
[16:59] <SpamapS> delinquentme: well that is likely because mysqld is not running
[16:59] <joppla> what the script does, basically, is this: on (networking and filesystems) mount container from network share into loopback, stop on runlevel [!2345] unmount loopback device
[16:59] <SpamapS> delinquentme: but its also possible that you've changed the path in /etc/mysql/my.cnf or even /etc/my.cnf or (the very seldom considered ) /var/lib/mysql/my.cnf
[17:00] <SpamapS> joppla: "start on networking" ?
[17:00] <delinquentme> SpamapS, what is mysqld?
[17:00] <SpamapS> delinquentme: *mysql*
[17:00] <delinquentme> Ok check
[17:00] <SpamapS> delinquentme: what did you modify in /etc/init/mysql.conf ?
[17:01] <SpamapS> joppla: can you pastebin your upstart job?
[17:01] <delinquentme> exec /usr/sbin/mysqld >> exec sudo -u mysql /usr/sbin/mysqld
[17:03] <SpamapS> delinquentme: *that* is why you are failing
[17:04] <SpamapS> delinquentme: change it back. You must start as root. mysqld will become mysql on its own
[17:04] <SpamapS> delinquentme: user        = mysql
[17:05] <SpamapS> delinquentme: that should be in /etc/mysql/my.cnf , and causes the switch to that user
[17:05] <delinquentme> SpamapS, changes outlined here: http://www.bbhart.com/848/ubuntu-and-upstart-and-mysql/
[17:05] <delinquentme> I mean he says to modify something else in my.cnf
[17:06] <SpamapS> delinquentme: you're just blindly trusting that, without any evidence as to why?
[17:06] <delinquentme> also its been reverted
[17:06] <delinquentme> and still the same issue
[17:06] <delinquentme> no mysql
[17:06] <SpamapS> delinquentme: once reverted, you have to do 'stop mysql' then 'start mysql'
[17:06] <SpamapS> delinquentme: 'restart mysql' will not re-load the upstart job
[17:07] <delinquentme> $ stop mysql >> stop: Rejected send message, 1 matched rules; type="method_call", sender=":1.90" (uid=1000 pid=18202 comm="stop) interface="com.ubuntu.Upstart0_6.Job" member="Stop" error name="(unset)" requested_reply=0 destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init"))
[17:07] <SpamapS> delinquentme: sudo stop mysql
[17:07] <delinquentme> damnit lol thats what that error meant?
[17:07] <SpamapS> delinquentme: also I just checked, and the default my.cnf for 10.04 does not have skip-bdb in it
[17:08] <delinquentme> yeah mine didn't so.. well at least thats good
[17:08] <delinquentme> now sudo start mysql ... seems to be hanging
[17:08] <joppla> SpamapS: http://pastebin.ubuntu.com/1197044/
[17:09] <SpamapS> joppla: this is actually not correct, even though it sounds good.. "start on filesystem and started networking"
[17:09] <SpamapS> joppla: runlevel [2345] is actually what you want (unless you're on pre-11.10)
[17:10] <SpamapS> delinquentme: its likely failing because mysqld is printing errors of some kind
[17:10] <SpamapS> delinquentme: do 'stop mysql', and then try 'sudo /usr/sbin/mysqld' and see if it prints any errors
[17:11] <delinquentme> nada from $ sudo /usr/sbin/mysqld
[17:11] <SpamapS> delinquentme: oh, check /var/log/mysql/error.log
[17:12] <joppla> SpamapS: the problem is not get it started, it starts fine. The problem is that it mount the container and then directly unmounts it again
[17:12] <delinquentme> theeere we go
[17:13] <delinquentme> looks like i need write access for mysql
[17:13] <delinquentme> that would do it.
[17:13] <delinquentme> chmod 777?
[17:15] <joppla> SpamapS: made the changes as you suggested, problem still exists though
[17:19] <SpamapS> joppla: ok hm
[17:20] <SpamapS> joppla: oh, yes, of course it does
[17:20] <SpamapS> joppla: the main process (script or exec) is what controls whether it is running or stopped
[17:20] <SpamapS> joppla: so the mount command exits, and upstart sees that as your job exitting normally
[17:20] <SpamapS> joppla: you want that all to be in pre-start
[17:23] <joppla> SpamapS: eureka :)
[17:23] <joppla> thanks a lot, I would probably spent hours on this
[17:24] <SpamapS> joppla: glad you could get it working
[17:26] <delinquentme> http://pastebin.com/  so heres the error output  ... however now I'm unable to run " sudo stop mysql "
[17:38] <SpamapS> delinquentme: /???
[17:38] <delinquentme> SpamapS, it runs .. just only when mysql is in its semi-running state
[17:39] <SpamapS> delinquentme: you pasted a pastebin.com link w/o output
[17:39] <SpamapS> like, just pastebin.com/
[17:40] <delinquentme> ROFL
[17:40] <delinquentme> ohhh man
[17:40]  * delinquentme deep breath
[17:40] <delinquentme> 1 cat
[17:41] <delinquentme> 2 cat 3cat .. OK http://pastebin.com/Cjarts72
[17:45] <SpamapS> delinquentme: do you have any data in the mysql database?
[17:46] <SpamapS> delinquentme: 120910  6:08:10  InnoDB: Operating system error number 13 in a file operation.
[17:46] <SpamapS> InnoDB: The error means mysqld does not have the access rights to
[17:46] <SpamapS> delinquentme: Most likely because of your sudo changes and such
[18:15] <delinquentme> SpamapS, ok so I gave my user " thrive " permissions to the DB
[18:15] <SpamapS> delinquentme: like, you chowned the files to thrive?
[18:15] <SpamapS> delinquentme: this is a study in "all the ways to break your mysql server"
[18:15] <delinquentme> yeah
[18:15] <delinquentme> i should have a separate user huh?
[18:17] <SpamapS> delinquentme: no, you should leave it alone and let it run as mysql
[18:17] <SpamapS> delinquentme: if you need access to the data files, you're doing it wrong
[18:21] <delinquentme> I mean the only thing that I've done which is out of the ordinary is drop in my own database files
[18:21] <delinquentme> sudo apt-get install mysql-server
[18:22] <delinquentme> according to the documentation should effectively " do what its supposed to do "
[18:22] <delinquentme> however everything after that command ... on the official documentation (https://help.ubuntu.com/10.04/serverguide/mysql.html) is busted
[18:23] <delinquentme> like official docs are saying to use init.d
[18:23] <delinquentme> sudo /etc/init.d/mysql restart
[18:23] <delinquentme> O_o;
[18:24] <SpamapS> delinquentme: thats just a backward compatibility thing
[18:24] <SpamapS> delinquentme: it works fine actually
[18:24] <delinquentme> how?
[18:25] <SpamapS> delinquentme: the init.d stuff works fine I mean.
[18:25] <SpamapS> delinquentme: it calls a compatibility layer which in turn calls the appropriate upstart actions
[18:25] <delinquentme> yeah =[  I mean I'd love a command to find out what the heck is special about my system
[18:26] <SpamapS> delinquentme: there's no such thing, though you can use config management to assert what you want to be true. :)
[18:27] <delinquentme> sudo apt-get install --reinstall mysql-server  
[18:27] <SpamapS> delinquentme: note that there is a new LTS .. with more up to date instructions https://help.ubuntu.com/12.04/serverguide/mysql.html
[18:27] <delinquentme> also it would be awesomely nice if this would reinstall the cruft which went wrong
[18:27] <SpamapS> delinquentme: it won't because it doesn't want to disturb your data
[18:27] <SpamapS> delinquentme: which means leaving /etc/* and /var/lib/mysql/* alone
[18:28] <SpamapS> delinquentme: you can 'apt-get purge mysql-server-5.1' to get rid of your modified config files and (optionally) databases.
[18:29] <delinquentme> Like i've not modified the dbs at all ... I can copy them back in 
[18:29] <delinquentme> and then i just chown those DB files to mysql
[18:29] <SpamapS> delinquentme: if you haven't modified them at all, you can just rm -rf /var/lib/mysql
[18:29] <SpamapS> delinquentme: and then do the purge, and then reinstall
[18:30] <SpamapS> delinquentme: the files will be created w/ the right perms, and all will be well
[18:30] <delinquentme> however I still need to get the databases in for the project
[18:30] <delinquentme> drop them in and chown them?
[18:31] <delinquentme> and then all will be good?
[18:31] <delinquentme> E: Couldn't find package mysql-server-5
[18:32] <delinquentme> nm
[18:32] <delinquentme> E: Couldn't find package mysql-server
[18:32] <delinquentme> i mean it was mysql-server **
[18:35] <delinquentme> Ok now I've purged ... then re-run "sudo apt-get install mysql-server"  but it didn't prompt me to set a password .. therefore .. not all of the original settings files were removed?
[18:38] <delinquentme> and what would cause this command: sudo netstat -tap | grep mysql  .... to hang
[18:38] <delinquentme> ?
[18:39] <delinquentme> seems to me like thats indications of bigger issues
[18:47] <SpamapS> delinquentme: mysql-server-5.1 is the actual package to purge
[18:52] <delinquentme_> in #mysql
[19:41] <delinquentme_> Ok so trying this again ... I've just run "sudo apt-get install mysql-server"  and I have no /var/lib/mysql dir
[19:42] <delinquentme_> ok good so now the 5.1 purge worked ^_^
[19:43] <delinquentme_> " ureadahead will be reprofiled on next reboot "
[19:43] <delinquentme_> so im going to reboot
[19:47]  * SpamapS applauds delinquentme_'s energy
[20:22] <delinquentme> OK did fresh install .. set new password ... still socket weirdness when trying to start
[22:05] <SpamapS> delinquentme: did mysqld actually start though?
[22:05] <SpamapS> delinquentme: and can you show me the socket weirdness you're talking about?
[22:45] <delinquentme> SpamapS, ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
[22:45] <delinquentme> same thing .. basically Im unable to start mysql
[22:45] <SpamapS> delinquentme: 13 again
[22:45] <SpamapS> delinquentme: ls -l /var/lib/mysql/mysql.sock
[22:45] <SpamapS> delinquentme: also thats not the usual mysql.sock path
[22:46] <SpamapS> delinquentme: should be /var/run/mysqld/mysqld.sock
[22:46] <delinquentme> ls: cannot access /var/lib/mysql/mysql.sock: No such file or directory
[22:48] <SpamapS> delinquentme: because thats the wrong dir
[22:49] <delinquentme> ls: cannot access /var/run/mysqld/mysqld.sock: No such file or directory
[22:49] <delinquentme> not there either
[22:49] <delinquentme> ... I dont think I changed any of the default settings
[22:52] <SpamapS> delinquentme: that socket is created when mysqld starts, so, it probably failed again
[22:56] <delinquentme> 120910 16:23:19 [ERROR] Do you already d another mysqld server running on socket: /var/lib/mysql.sock ?
[22:59] <delinquentme> sudo start mysql never actually resolved
[22:59] <delinquentme> resolves**
[22:59] <delinquentme> it just extended hangs
[23:03] <delinquentme> mysql start/running, process 9839
[23:03] <delinquentme> nice!
[23:27] <SpamapS> delinquentme: are you absolutely required to use 10.04 btw? The upstart job is *a lot* better on 12.04
[23:28] <delinquentme> SpamapS, I think im making progress
[23:28] <delinquentme> and 10.04 is my go to default OS atm
[23:28] <delinquentme> so its not just this that I have on it ... its the rest of my dev enviros
[23:30] <SpamapS> delinquentme: ok. Well as somebody who has been actively trying to fix the mysql upstart job, and quite a few others since 10.04 was released, I have to recommend that you start looking at upgrading....
[23:31] <SpamapS> delinquentme: plus, MySQL 5.5 is a huge improvement over 5.1