@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13



Comments:

<0> thanx
<1> hi all, hi salle: yesterday I found that my /var/run/mysqld directory in my ubuntu system is set to 770 and owned by mysql.root I set it to 775 so that any user can connect to mysql but when I restart the PC it again changed to 770, what am I missing please?
<2> munzir: grep chmod /etc/rc.d/*; grep chmod /etc/rc.d/init.d/*
<3> what is wrong with this: INSERT INTO users(username, email, p***word, salt, created_at, active, type) VALUES ('wesley', 'sdsdsd', 'dsdsdsdsds' 'f0f', NOW(), '1', '0') column count does not match variable count, think it has to do with the p***word column. is that a reserved variable? phpmyadmin styles it differently although i've used a p***word column without errors before
<4> zanzina: missing comma between 'dsdsdsdsds' and 'f0f'
<2> good eye
<2> both of my eyes are made of wood :(
<3> indeed, thanks guys
<2> and my arms are off. I have to type with my tongue
<1> infi: grep -r chmod /etc/rc* |grep mysql reveals no results at all
<2> odd.
<2> put your socket in another directory.
<1> infi: the point is I am trying to understand how to troubleshoot problems more than to solve this specific problem ;)
<5> are string matches in SQL case sensitive?
<6> kestas: it depends, generally no
<5> hi Urgleflogue :)



<6> hi
<7> my eyes be tired could someome help me debug this query? $query="SELECT * FROM raauth.users WHERE id='".$_SESSION["id"]."'";
<6> look here: http://kimbriggs.com/computers/computer-notes/mysql-notes/mysql-data-types.html
<6> rolemodel: is id numeric?
<5> if I have say a username, and I want to SELECT * FROM table WHERE username=".$username will that match with or without case sensitivity?
<1> infi: now i want to understand why 770 mysql.root is not enough? isn't mysql run as user mysql, why do I need to give others permissions?
<7> yeah
<6> do not '' it then
<2> munzir: when the user runs the mysql client, it runs under their userid.
<2> as well as any program that connects to localhost will run as whatever user runs it (or apache, in the case of a web script)
<2> therefore the directory containing the unix domain socket has to be at least o+x if you're connecting to localhost
<7> Urgleflogue still getting Parse error: parse error, expecting `T_CASE' or `T_DEFAULT' or `'}'' i
<1> infi: this means that having the mysqld directory with 770 couldn't be productive by all means and hence I should file this as a bug to ubuntu?
<6> rolemodel: then I guess something is wrong with the string concatenation in your where expression
<4> rolemodel: print $query; will tell you what exactly do you send to MySQL
<2> munzir: first, you have to figure out where the permission change is actually occurring. there might not be an explicit chmod of the /var/run/mysqld directory by name; it could be a chmod -R /var/run/*, so your grep may not have worked.
<2> if it is ubuntu, it's not really a "bug" per se. that's just the default place where some mysql packages store their socket files. often, you have to change the default behaviour of an application to tailor your environment, correct?
<8> infi, I have several "starring" field in one table of movies, say starring1, starrring2, starring3, how to query the table by a starring keyword?
<1> infi: first grep -r 'run' /etc/rc* |grep chmod shows only a chmod 664 /var/run/utmp so no script is doing this?
<8> currently, I'm using: select * from movie where starring1 like "%lopez%" or starring2 like "%lopez%" or starring3 like "%lopez%";
<2> !tell hxu about normalization
<9> Alrighty.
<8> Is there a more convinient way?
<1> infi: second, ubuntu used to have this working properly so either it's a bug or this did it on purpose for some reason I would like to know. besides I expect the default configuration to be a working one
<2> hxu: yes, normalize your tables properly.
<8> sorry, English is not my mother tongue. What does "normalize" mean?
<2> munzir: you still haven't isolated where the exact permission change is taking place. once you have that, you can start pointing fingers, if that's what you want to do.
<2> hxu: read the link that SQL sent you.
<8> OK.
<8> Is it about proper table structure design?
<2> yes.
<2> as in, don't have 3 fields that mean the same thing, and call them field1, field2, and field3, because you run into searching issues exactly like you are experiencing (among many other reasons)
<8> The word "normalize" makes me feel sad. It seems that my table design is stupid, or kind of insane.
<2> it's not meant to offend, but your table design is "less than optimal".
<8> culture gap, indeed.
<8> I'm just joking, never mind :-)
<2> it's a technical term. :b
<1> infi: ok you are right, but I don't know of any place besides those rc scripts that does this on reboots, any hint on where to look?
<2> and it takes time to learn to be a good database architect.
<8> sure
<8> My tongue is off, I have to type with my nose.
<2> munzir: I would widen your search just grep -ir chmod /etc/* and manually look through all of the results it returns.
<1> infi: ok I will try to figure it out. thanks for your help
<10> hello people
<2> greetings, earth creature!
<10> i have some problem, i has copy the files .myr .myr and .frm from orther server, and past on my server, but that files now not can be writed by mysql :x
<10> tracker.addedrequests repair error Table 'addedrequests' is read only
<10> i as tryed give permitions 777 to files and nothing
<8> MalMen, any one responded to your question?
<8> s/any one/anyone
<11> hi all
<10> hxu n :x
<10> *no
<11> can someone help me with the command line to back up a table in bash
<10> hxu you know how can help me?
<12> yellowperil, try mysqldump -u root -p<pwd> db
<11> I dont want to dump the full db
<8> MalMen, I want to help you very much
<11> just some tables from it
<8> MalMen, what is the permission of your database directory?
<10> drwxrwxrwx 2 mysql mysql 4096 Feb 22 09:37 tracker



<8> /var/lib/mysql/tracker?
<10> yes
<11> mysqldump can do tables :)
<8> who is your mysqld process running as?
<10> root
<10> or mysql
<10> i dont know certain
<8> tell me the result of "ls -l /var/lib/mysql/traker"
<10> hxu
<10> its working now
<8> really?
<10> the problem its i as copy the files and mysql is running
<10> i now restart the mysql and thats rocks :)
<8> ok
<8> MalMen, are you Portuguese?
<13> hey - i'm trying to do a tab dump of a table but it keeps messing up because some of the fields are text fields full of \n... is there some way i can get these stripped out, or, preferably, contain each field in the tab file with ""? e.g. "field""field2"?
<10> hxu yes
<10> lol
<10> you too?
<8> Your typed a lot of grammar errors.
<10> looooooool
<10> normal
<13> didn't there used to be some switch for dos friendly or something?
<14> please could someone help me write a query which selects all entries in one table, which do not have a corresponding entry in another table?
<15> !m tkp join
<9> tkp: (JOIN Syntax) : http://dev.mysql.com/doc/mysql/en/JOIN.html
<14> table one is 'user', table 2 is 'user_login' and I need to find all entries in 'user_login' which are not linked to an entry in the 'user' table
<14> hmm. ok. tyhanks
<16> gah, anybody see mistake here? INSERT INTO cms_privileges (`catid`, `parid`, `name`) SELECT ((SELECT MAX(`catid`+1) FROM cms_privileges), 43, `name` FROM cms_privileges WHERE parid=4)
<16> check manual near FROM cms_privileges WHERE parid=4
<14> OK. I have the query: select * from user_login LEFT JOIN user ON user.user_id = user_login.user_id WHERE user.user_id IS NULL ORDER BY user_login.user_id;
<14> but I need to actually delete the found records
<14> so I changed it to: delete from user_login LEFT JOIN user ON user.user_id = user_login.user_id WHERE user.user_id IS NULL ORDER BY user_login.user_id;
<14> which fails
<14> ho can I correctly translate that select statement to a delete statement
<14> ?
<16> sure
<16> which version of mysql?
<14> 4.0.26
<16> ok that will ****
<16> install something newer man
<14> no cn do
<14> I know it ****s
<14> but im stuck with it
<2> Jax: `name` FROM cms_privileges WHERE parid=4 also needs a select
<16> the select starts further left
<16> tkp the easiest way is just to run that query and select only the ID.
<16> make a comma delimited list out of the IDs, and then do: DELETE FROM your_table WHERE id IN(4,5,6,7,7,8);
<2> jax: I don't think it will work that way.
<16> your list in there IN
<17> how do i check if a record exsists ? (if exsists where firstname='foo', lastname='bar')
<18> Jax: The first SELECT (from the left) either needs a * or explicit column list, or remove the outer ()'s from the expression that follows, so that it's a valid SELECT list with single values. I don't believe SELECT (1,2) ... is allowed.
<19> hello
<19> i have a table "article" and a table "comment", can i somehow (with a join?) find out how many comments an article has?
<18> tkp: You can use a multitable delete in your version of 4.0. But the syntax is DELETE t1, t2 FROM ... OR DELETE FROM t2, t2 USING ...;
<19> "select article.headline, comment.count(id) from article inner join on article.id=comment.parent_id"
<19> something like that...
<18> tkp: I don't think the form you used is supported.
<19> is it possible somehow?
<18> tkp: You don't need a 2 statement approach.
<18> mm2000_laptop: Sure. GROUP BY.
<19> Can you give an example?
<19> i have some other joins too. for sections
<20> !man date calculations
<9> (Date Calculations) : http://dev.mysql.com/doc/mysql/en/Date_calculations.html
<18> mm2000_laptop: SELECT article.id, count(comment.id) FROM article LEFT JOIN comment ON article.id=comment.article_id GROUP BY article.id
<19> Xgc: thanks, i shall try that!
<18> You're welcome.
<20> I need to extract all entries from a table where the date is CURDATE() - 1 month in the row dateofrelease ....
<20> trying to figure out what sort of operation I need to do to subtract a month from CURDATE :S
<18> Nathalas: It's probably under date/time functions.
<20> Alright, thanks
<20> mysql> SELECT something FROM tbl_name
<20> -> WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= date_col;


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #mysql
or
Go to some related logs:

flashchat Lost connection to MySQL server during query
GUIPod ubuntu
ubuntu ext2 turn journaling on
#ubuntu
xserver-xorg postinst warning: not updating /etc/X11/X; file has been customized
#web
softlevel unionfs
netgear iptables
debian swith 2.4.27 2.6.8
apt-get repos for unbuntu



Home  |  disclaimer  |  contact  |  submit quotes