@# 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 14



Comments:

<0> I get a syntax error with: select x, y (SELECT b from b LIMIT 1) AS b FROM a WHERE b like '%z%'; The complaint seems to be with the WHERE, If i change it to WHERE x LIKE '%z%' it works though. Any ideas how to get this to work with b?
<1> why not just SELECT x, y, b FROM t1 WHERE b LIKE 'bla' LIMIT 1; ?
<2> reind y, (SELECT
<3> wiki-ize: what? where?
<0> firewire, Apachez B/c I want to limit the results from the subselect to 1 for each row of the outer select
<3> reind: the syntax error msg always indicates the part of the string it can't parse any more. so you look to the start of it, and you will find the prob.
<1> reind what exactly are you trying to do ?
<0> sorry it's not a syntax error, the error is "Unkown column 'b" in 'where clause'
<3> reind: anyway firewire gave you the answer already
<3> hi firewire !
<4> Uh hey, I've got an interesting problem. MySQL won't start. I keep getting ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
<2> :-D
<2> Lord_Kestrel that's a client error. Try starting the server
<4> Yeah that's what I've been trying to do
<3> Lord_Kestrel: netstat -l | grep mysql



<2> check the mysql error file
<3> firewire: distros are so annoying, not getting their socket locations in sync.
<5> arjenAU: I see in the " --help" output from the command-line client that adding extra " -v"'s will show more detail, but I cannot seem to make it display any "table format", which is the documented behavior. Surely I'm doing something wrong. :)
<3> wiki-ize: yes you are. you are confusing cmdline options to the client, with SQL commands.
<4> didn't work
<3> Lord_Kestrel: that command can't possibly NOT work.
<2> arjenAU indeed
<4> netstat -l | grep mysql?
<4> what's supposed to happen
<3> Lord_Kestrel: unless you kinda misconstrue what I said.
<3> Lord_Kestrel: you're supposed to read the output and learn where the socket is, if anywhere.
<4> there was no output
<3> if nowhere, server not running. if server not running, check the server's error log as firewire noted.
<0> Apachez , firewire I'll try it again without the subselect, see if it works out. So, there's no way of doing this with a subselect?
<3> alternatively, grab a banana.
<5> arjenAU: Well, that was my original question. My tables contain data that is too wide for the console. How would *you* format it with the client so that you could see it in an 80-column xterm?
<3> reind: you need to bloody well insert a comma in the right place. that's all. firewire noted this ages ago
<3> wiki-ize: ah. no. you don't. where would it put the rest of the data then??
<4> would that error log be xxx.local.err?
<0> arjenAU ah, i didnt notice that. thanks. but there isnt a syntax error in the actual code. sorry
<3> Lord_Kestrel: I presume that's a rethorical question, since you are quite capable of finding out faster than you can ask/answer it here
<5> arjenAU: I'm sure there are some regex tools somewhere that will let me choose where to start printing, but failing that, I would be happy just to print the first N characters of the field. Is that possible?
<0> It seems to be complaining b/c the column referenced in the WHERE clause is the result of the subselect. If i use another column, it works fine.
<3> wiki-ize: no. but you may wish to use a different select statement that outputs what you want.
<4> Okay, I've got what appears to be the problem
<4> 060301 16:06:59 mysqld started
<4> 060301 16:06:59 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
<4> 060301 16:06:59 InnoDB: Operating system error number 13 in a file operation.
<4> InnoDB: The error means mysqld does not have the access rights to
<4> InnoDB: the directory.
<4> InnoDB: File name ./ibdata1
<4> InnoDB: File operation call: 'create'.
<4> InnoDB: Cannot continue operation.
<4> 060301 16:06:59 mysqld ended
<6> DON'T FLOODPASTE
<4> oh sorry.
<6> you found the problem, why not fix it instead of pasting 10 lines into the channel about it?
<1> arjenAU whats with you and bananas today ? :P
<7> Who doesn't like a tasty banana?
<4> okay, chill. I'm not exactly as experienced as just about anyone else here buddy.
<3> Lord_Kestrel: you didn't set up mysql server properly. you mucked up the permissions.
<4> what should the permissions be set to? Mysql?
<3> Apachez: every day. I don't like monkey-see-monkey-do attitude in homo sapiens.
<3> Lord_Kestrel: funnily enough, the install-binary instructions are quite clear.
<3> Lord_Kestrel: did you install from RPM, binary tarball, or sources?
<1> i prefer homo sapiens sapiens over homo sapiens :)
<3> Apachez: indeed. but for many the extra sapiens is really superfluous
<4> Okay, this thing has been installed for quite some time, and running perfectly until I had to change a p***word to an old_p***word
<6> Lord_Kestrel: perhaps you're starting it wrong?
<4> No, I'm pretty sure it's because I changed the permissions
<3> Lord_Kestrel: nono, really. this is rather more than that.
<3> Lord_Kestrel: this problem is about unix filesystem permissions, has nothing to do with mysql access permissions with pwds and all.
<4> Right, so if I reset their unix permissions to owner "mysql" will that straighten everything out?
<6> Lord_Kestrel: it might, but it might not be an ownership issue
<6> Lord_Kestrel: how are you starting the server?
<3> Lord_Kestrel: you may wish to answer my earlier question about how you installed, and then consult the binary installation instructions for info on how the permissions SHOULD be. randomly doing stuff is probably not gonna be wise.
<3> and as Darien also says, you need to start the server from sudo/root, not a regular user. otherwise it won't be able to start.
<4> okay, I installed ages ago, but I'm positive it was okay
<3> and no mysqld does not run as root, but you need to start mysqld_safe or /etc/init.d/mysql that way
<4> And yeah, I've tried as sudo



<4> I've been looking over the install directions for a bit now actually
<3> Lord_Kestrel: is this on OS X ?
<4> yes
<4> okay, I switched the "data" permissions back to mysql
<3> doesn't matter. but just worked that out from the logmsg about the case insensitivity. ok.
<4> it works fine now
<3> great.
<4> thank you
<6> did you install from the binary .pkg files from mysql.com?
<4> you mean me?
<6> yes
<4> really it was so long ago I don't remember.
<4> probably?
<0> Is there anyway to SELECT rows with only 1 column that is DISTINCT ? so, something like SELECT a, DISTINCT(b), FROM c ?
<8> can i create a temporary table with a select statement
<6> you mean a heap table?
<8> CREATE TEMPORARY TABLE Layout SELECT
<8> InvHistoryDetail.ARSalesCode AS PromoCode
<4> okay, everything's running just fine
<9> has mysql changed the way you connect?
<8> something like that
<4> thanks
<6> !man temporary tables
<9> $conn = mysql_connect("localhost:8080","root","new-p***word");
<10> (TEMPORARY TABLE Problems) : http://dev.mysql.com/doc/mysql/en/Temporary_table_problems.html
<11> reind: that doesn't really make sense. Did you mean to use GROUP BY?
<6> !man create table
<12> I'm still having problems with a corrupted InnoDB database. When I attempt to access it, my log file fills with 100's of 1,000's of "InnoDB: Warning: trying to read doublewrite buffer page". Anyone know how to fix this or drop the database? DROP DATABASE causes this loop to occur.
<10> (CREATE TABLE Syntax) : http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html
<6> stack_: run CHECK TABLES yet?
<13> stack_: is mysql able to start ?
<6> dgilmore: TIAS
<12> Darien, yes, when it hits the database, it freaks
<14> pins wrong port 3306
<12> TodoInTX, yes it runs until I try to access the one database, then it freaks
<0> inviso well im doing osmething like SELECT a.a, b.b FROM a b where a.id = b.id. But there are lots of b.bs for every b.id = a.id. So, I want to get only 1 result from b for every a.id = b.id. So, if i could restrict the results from the b table so that there are no rows with the same b.id it'd work (yeah, that's a sorta convoluted explanation)
<13> stack_: last time I saw this, I ended up upgrading to the latest 4.1 branch and that fixed it.
<12> TodoInTX, this is the 5.0 series
<6> stack_: might try increasing the innodb_force_recovery to see if you can dump the table
<13> ah ok nevermind then,
<12> Darien, I put it at 4 which didn't seem to do anything
<6> stack_: hmm, that's not good
<6> !man force recovery
<10> Nothing found.
<6> grr
<6> !man innodb_force_recovery
<10> Nothing found.
<6> !man forcing recovery
<10> (Forcing Recovery) : http://dev.mysql.com/doc/mysql/en/Forcing_recovery.html
<6> :D
<5> I have read the 3.x/4.x manual page describing the syntax of SELECT, but I don't see a way to control the size (width) of the thing returned from the query. That is, SELECT * from foo LIMIT 1 seems obvious when I want only a single row, but there doesn't seem to be anything like HLIMIT to squeeze (or truncate) columns. Am I missing something obvious?
<5> I should hasten to add that this is using 'mysql' from the command line.
<6> wiki-ize: you can't
<6> wiki-ize: unless you want to truncate your columns in your SQL
<13> !m string functions
<10> string: (Functions and Operators) : http://dev.mysql.com/doc/mysql/en/Functions.html
<5> todo: Many thanks!
<13> wiki-ize: that's not an answer just an investigation
<6> TodoInTX: you missed
<14> todo use man
<6> it's '!man searchstring' or '!m target searchstring'
<13> !man string functions
<10> (String Functions) : http://dev.mysql.com/doc/mysql/en/String_functions.html
<6> there you go
<13> ah I though !m = !man
<5> There are no "answers", just directions further down the path. :)
<13> what is !m anyway then ?
<14> !m TodoInTX string functions
<10> TodoInTX: (String Functions) : http://dev.mysql.com/doc/mysql/en/String_functions.html
<13> archivist: thanks but what is the difference between !m and !man ?
<14> note your nick in my example
<5> String Functions - chapter 12.3. Thanks again.
<13> ah
<6> wtf?


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

cache:Ms3sKDoF6AwJ:www.quotesdb.info/freenode/php/04Feb2006/32.html zend_ini_str
funny screensavesrs
#perl
#fedora
spilt a variable javascript
deauthenticated due to local deauth request
#ubuntu
#perl
#math
#lisp



Home  |  disclaimer  |  contact  |  submit quotes