| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Comments:
<0> (if travelling across the internet) <1> How to make it listen on ext IP adr? <1> What about unsafe? <0> the mysql protocol is not really encrypted, and having the daemon listening to the internet at large invites "unwelcome guests" trying to knock on your door. <1> OK. <0> at least filter hosts to only allow the exact hosts you want to query it from. <1> ok, thanks :) <2> Hi all <2> I have a database with names. Now I want to create for every record a unique number, and I want this number randomly to be choosen. Ofcourse this can be done using a small piece of code, but perhaps there is a more easy/efficient way to accomplish this with mysql? <3> can some one tell me is there any way to replicate some tables from mysql database instead of replicating whole db ? <3> any one ? <4> <12> I am creating a lonf string in which I do searching and replacing of characters <5> how does one use count in sql <0> select count([column|*]) from [table] where [...] <6> Does version 4.1 support locking on individual rows or do I have to lock an entire table? <7> ctooley: it depends on the table type
<7> and not the mysql version <7> innodb does row level locking <7> myisam table level locking <7> berkley db page level locking <6> so if we were to switch to innodb we could do row level locks. <6> thanks <8> when i changed to innodb i started getting "deadlock found" for a certain delete statement virtually every time <8> delete from table1 where not exists (select something from othertable where table1.x=othertable.y) <7> i dont think subqueries are supported in delete statements <7> if the table from which you delete is included in the subquery <6> I want to do something like "update table set handled = 1 where id = ( select id from table where handled != 1 order by id desc limit 1)" and I would like the id of the column it just performed that update on. <6> I think DBI's exec will return that id, but I'm not sure. <9> infi: thanks for that explanation makes sense now <0> narada, np <10> ok... INSERT INTO [...] ON DUPLICATE KEY UPDATE <10> since I'm using PHP, how do I know after this if the query resulted in an INSERT or in an UPDATE? <0> do you care? <0> the data was stored. <10> I care, since I need to present different messages to the user <5> does anyone know a place where to find worms <0> then I'd suggest doing it with a failed insert, and retrying the update in a second query <0> bladhasd: your garden? a bait shop? <10> ... which is precisely the kind of thing I was trying to avoid :/ . I was looking for a "direct" way to it <0> bladhasd, actually, jussec <0> I pasted a comment on the insert page a couple of years ago that talks about this. <5> aha <0> http://dev.mysql.com/doc/refman/5.0/en/insert.html <0> see the third comment down <10> hmmm interesting :) <10> let's check that <0> the link to the bug I posted contains more info, as well <0> iirc, it was working as designed, and the explanation was in the bug comments <10> it works =) <10> thanks a lot infi <0> cheers <0> I struggled with the same thing, so I'm glad my hours spent frustrated helped someone else out ;) <11> can anyone explain to me why adding the line 'ndbcluster' in my.cnf would cause mysql to report as dead on debian? <10> infi I just noted something... I may be thinking wrong, but let's suppose that the query returns 4. is that 2 updates or 4 inserts? :) <11> even though it actually starts <12> dp: MySQL probably can, in its logfile. Are you actually trying to use clustering? <11> mendel: yes <12> Then go by the error in the logs <11> well <11> here's the problem <11> the error in logs says that mysql didn't start. but a quick ps | grep mysql shows that is has <11> but it's still spitting back the error <12> No, the error *that mysql logged*. <0> morphine, how many insert statements did you run? <0> there's enough information to determine how many did inserts and how many did updates, but not which did which. <0> that's why I think I determined to do them one at a time in the end. <0> thus you always get 1 or 2. <11> mendel: Feb 9 15:17:05 jackson /etc/init.d/mysql[4768]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in Feb 9 15:17:05 jackson /etc/init.d/mysql[4768]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed <11> Feb 9 15:17:05 jackson /etc/init.d/mysql[4768]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' <11> Feb 9 15:17:05 jackson /etc/init.d/mysql[4768]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! Feb 9 15:17:05 jackson /etc/init.d/mysql[4768]: <11> Feb 9 15:17:07 jackson mysqld[4670]: 060209 15:17:07 [Note] /usr/sbin/mysqld: ready for connections. Feb 9 15:17:07 jackson mysqld[4670]: Version: '5.0.18-Debian_7' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Debian Etch distribution <11> **** <11> sorry about that <11> http://hashmysql.org/paste/viewentry.php?id=1433 <11> there's the error <12> Those first log entries are clearly from "/etc/init.d/mysql" <11> but mysql is actually running, as you can see from the last 2 lines in the log
<10> well in my situation I know that it's just one row, so it's 1 or 2, but I was thinking that eventually that might not prove true <12> !perror 2 <13> System error: 2 = No such file or directory <12> So /etc/init.d/mysql us running /usr/bin/mysqladmin, which is complaining that it can't find the socket. <11> correct <11> it actually loops and tried 7 times <12> Well, there's your problem. Diagnose that on your system! <11> ... <11> I've been trying to <12> Is the socket present? <11> at that point? not that I can tell. immediately afterwards? yes <12> That's useful too, then. What happens if you make that 'mysqladmin' command happen a few seconds later, with a "sleep 3" before it? <11> hold <12> Perhaps MySQL is just taking longer to start up. <14> www.kardelen.gen.tr <10> wtf? <14> www.kardelen.gen.tr <15> hey. how would i go about copying a table (fields AND data)? <14> www.kardelen.gen.tr <11> /kick dosttt <12> See, all of this is a lot more useful to us than saying that "ndbcluster" makes mysql report as dead. <11> mendel: yes, it reports as alive after the sleep 3 <12> That's all it was, then <11> but <12> Adding 'ndbcluster' made mysql take a bit longer to accept connections. <12> but? <11> hold a sec <11> nm then <11> I just made it wait longer in the loop <11> thanks for the suggestion <16> FBH^, CREATE TABLE tablename LIKE Othertable INSERT INTO tablename SELECT * FROM OtherTable I dunno <12> np. if it's your OS's start script, they probably just didn't consider that that'd happen <9> gah! memory engine doesn't support TEXT type :( <9> ERROR 1163 (42000): The used table type doesn't support BLOB/TEXT columns <15> ty ungy <16> FBH^, it worked? <15> i actually just did CREATE TABLE blah_test SELECT * FROM blah; <15> it worked perfectly, except that i had to re-add the PRI KEY <15> no biggie. <16> ahh ok well that could work as well <17> is there a way to remove all text after a space in a field? <18> !man rtrim <13> (String Functions) : http://dev.mysql.com/doc/mysql/en/String_functions.html <17> hmm <17> right.. but i don't have console access, so it will have to be a phpmyadmin query <19> moin <16> mindamp, you can type anythign you want into a phpmyadmin query window <18> mindame then just edit if its a one off <19> would someone plz be so nice and can give me an hint in clustering mysql? <17> hmm.. <17> i used this ..SELECT LEFT(login, LOCATE(' ',login)-1) AS login <17> FROM pmd1043_users; <17> to no avail... it displayed the new column, but it didn't take... <19> i got 2 nodes and when i do an "create database test" it doesnt create the database in cluster mode <16> !man Clusters <13> Nothing found. <16> !man Cluster <13> (MySQL Cluster) : http://dev.mysql.com/doc/mysql/en/NDBCluster.html <20> holas <19> Ungy: thx <17> anyone? <9> guys; i have a very odd problem; if i use TEXT with memory engine it says it doesn't accept it but if i use VARCHAR then it says too big use TEXT instead <9> "ERROR 1074 (42000): Column length too big for column 'data' (max = 21845); use BLOB or TEXT instead" <16> Narada nice sounds liek a bug <9> :( <18> what was the error when using text <9> archivist: "ERROR 1163 (42000): The used table type doesn't support BLOB/TEXT columns" <21> hello.. i've got a number of mysql dbs at the site where i'm working these days, and i'm wondering if there's a way to specify database specific options in ~/.my.cnf. for example, can i create a [dbname] heading, with, say, host options under it? how do most people manage this sort of thing? <16> Narada, I think you have been caught between a bug and a hard place I believe that table type doesn't support TEXT so the otehr message is incorrect when it tell you to use text or blob it shoudl tel you to use a different Engine <9> gah :( <18> not a bug read the doc its documented <16> cudgel, I just type crap in
Return to
#mysql or Go to some related
logs:
#perl ubuntu mount privelages nullmailer-inject example #math #linux system32.cfg error
#perl SSH-account gentoo mdadm reinstall linux Virtual Printer centos
|
|