Home Page   #javascript  #perl  #c  #openmoko  #php  #ruby-lang  #apache  #cisco  #java  #mysql   Wallpapers Girl
Reliable $1 Web Hosting by 3iX

Channels


#mysql

30 December 2007


Total 14 pages. You are browsing page 1/14.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last

--- Log opened Sun Dec 30 00:00:02 2007
--- Day changed Sun Dec 30 2007
00:00 <****> and the down becomes top
00:00 <****> ORDER DESC
00:00 <****> or change the order by in query
00:00 <****> !man order by
00:00 <****> see http://dev.mysql.com/doc/refman/5.0/en/alter-table.html
00:00 <****> bleh, silly bot
00:03 <****> duno, i set /work 777 just for the heck of it and it still fails to start
00:03 <****> i dont have any order by in query
00:04 <****> \monster\ did you change everything under /work?
00:05 <****> everything? not sure its a permission thing, i can switch to mysql user and access everything
00:05 <****> . /work is 777 and /work/mysql is drwxr-xr-x mysql:mysql
00:21 <****> ok i give up, i moved the data back to /var/lib/ and it starts up fine, ill create another drive under vmware to mount it on ..how exactly can I mount /var/lib/mysql on its own partition
00:23 <****> damn i need some help :/
00:26 <****> can someone help me here?
00:26 <****> http://pastecode.net/?action=viewpost&tag=2500
00:34 <****> oh man what gives, i mounted /var/lib/mysql on a new partition and moved the old data there ...and now i get the same error as I did when I moved the data somewhere else
00:34 <****> what am I missing here
00:35 <****> drwxr-xr-x 13 mysql mysql 4096 Dec 29 18:28 mysql thats /var/lib/mysql
00:39 <****> whats the error?
00:41 <****> . /usr/libexec/mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13)
00:42 <****> its not permissions for sure, 'mysql' user has full access
00:43 <****> run this
00:43 <****> ls -l /var/lib/mysql
00:44 <****> and? all files are mysql:mysql
00:44 <****> how are you starting mysql?
00:44 <****> service mysqld start
00:44 <****> centos4
00:45 <****> is there a user arg in my.cnf?
00:45 <****> yes, 'mysql'
00:46 <****> are you sure you're starting mysql in the same vmware instance as you're checking permissions in?
00:46 <****> yeap, i only have 1
00:46 <****> something isn't matching up
00:47 <****> do this
00:47 <****> su - mysql
00:47 <****> cd /var/lib/mysql/
00:47 <****> ya works fine, i can go there and create/delete files as mysql
00:48 <****> then mysql isn't starting up as the right user
00:48 <****> heres something I found which might fix it http://www.linuxforums.org/forum/servers/54215-moving-mysql-datafile-another-location-2.html#post541016
00:48 <****> people in that thread have the same problem
00:48 <****> when you run service mysqld start are you running that as root?
00:48 <****> gona give it a shot
00:49 <****> ah selinux
00:49 <****> actually not sure if i can use that, the path hasn't changed
00:49 <****> hmm
00:51 <****> cat /etc/selinux/config
00:51 <****> SELINUX=enforcing
00:51 <****> ok
00:52 <****> change that shit to permissive
00:53 <****> i guess i need to reboot
00:53 <****> go for it
00:53 <****> theres no better solution than turning it off?
00:54 <****> i guess it doesn't matter on my dev box
00:54 <****> eh not really
00:54 <****> weird
00:54 <****> you can change the selinux config but that's a bit beyond the scope of what we do here
00:54 <****> or what I do here :)
00:54 <****> someone else might
00:55 <****> i have latitude and i need to find out if another lattitude is within two degress of it, pos or neg...
00:55 <****> ya i think im good for now
00:57 <****> how does that go into a select statement?
00:58 <****> hint, abs()
00:58 <****> ok
00:58 <****> but if its negative
00:59 <****> hmm
00:59 <****> its alive!
00:59 <****> :)
00:59 <****> thanks :)
00:59 <****> like if it's 42.8 or -42.8
01:05 <****>0)) or ( (lat1<0 and lat2<0) )
01:05 <****> how to shorten?
01:06 <****> oops forgot a < 2 in there
01:06 <****> but anyway, a way to reduce that even more?
01:10 <****> once i Connection conn = DriverManager.getConnection(url, user, pass); can i send in more than one statement? like using vars and temp tables and stuff?
01:20 <****> Can MAX() be used with multiple numbers as arguments or only with a field from which it gets the max element?
01:20 <****> If the latter, is there anything that performs the former's purpose?
01:24 <****> show me an example
01:25 <****>prepare("INSERT INTO `wof_stats` (name,wins,games,money,best) VALUES (?,?,1,?,?) ON DUPLICATE KEY UPDATE wins=wins+?,games=games+1,money=money+?,best=MAX(best,?)");
01:25 <****> specifically that last ? which takes on a numeric value
01:26 <****> hmm no
01:26 <****> you should do that in php
01:26 <****> or perl
01:26 <****> whatever that is
01:26 <****> SQL knows what the current value of best is
01:27 <****> Perl doesn't until it runs the query, so I might as well update in the query
01:27 <****> oh if it's only one value you can do it in if
01:27 <****> if (best < foo, foo, best)
01:28 <****> so "ON DUPLICATE KEY UPDATE wins=wins+?,games=games+1,money=money+?,best=IF(best < ?,?,best)" ?
01:29 <****> try it
02:11 <****> hello folks
02:11 <****> Dont forget the bots!
02:11 <****> the_wench: botsnack :)
02:11 <****> does anyone know if mysql is able to do the same thing as ip2long does in php?
02:11 <****> other words convert ip address to a number
02:13 <****> yes
02:13 <****> inet_aton() and inet_ntoa()
02:15 <****> thank you very much! and i was like 90% sure it wasn't possible
02:25 <****> ok there is one thing that mysql can't do... it won't convert hostname to ip, will it? :s
02:25 <****> if it can, i'm opening a beer. now.


Total 14 pages. You are browsing page 1/14.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo