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