@# 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 15 16 17 18 19 20 21



Comments:

<0> I have a table with 4 columns, a,b,c,d... a,b,c is the primary key... one script I'm writing tries inserting a row a,b,c,0 where a,b,c match another row (hence it fails to get inserted), is there a way in the same sql query to say that if a,b,c,1 exists, switch the 1 to a 0?
<1> hi
<0> like an update that does an insert if the row does not exist
<2> !m dampja1 REPALCE
<3> dampja1: Nothing found
<2> !m dampja1 REPLACE
<3> dampja1: (REPLACE Syntax) : http://dev.mysql.com/doc/mysql/en/REPLACE.html
<4> apalac
<1> i get a strange error trying to connect to mysql
<1> Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
<0> thank
<0> s
<1> what can i do ?
<5> Duesentrieb: yeah it's def. trying through a socket, but how can i enable both external and internal/socket/localhost connections ?
<2> dampja1, That's a DELETE WHERE a,b,c, INSERT a,b,c. See if that matches what you want.
<2> !man Can't connect to local



<3> (Can't connect to [local] MySQL server) : http://dev.mysql.com/doc/mysql/en/Can_not_connect_to_server.html
<2> BeK, Try that
<1> okey
<6> Hi everybody. how would you do to speed up a search with an wildcard in the beginning. I have a big database. around 2 gig I have put an index on it so a query like 'my_seek_data%' goes fast. but a query like '%my_seek_data' goes a lot slower. can I index it somehow so it goes faster.
<2> Marre, Not really. You may check to see if a FULLTEXT INDEX is what you need
<2> !m Marre fulltext search
<3> Marre: (Full-Text Search Functions) : http://dev.mysql.com/doc/mysql/en/Fulltext_Search.html
<6> fulltext can't have a wildcard in the beginning
<2> You might not need a wildcard in the beginning... I don't know your exact specifications.
<2> With a wildcard in the beginning, there is no way to speed that up.
<6> will[werk]: are you sure
<6> ?
<1> will-werk: i read it and my mysql file exist
<1> will-werk: i read it and my mysql.sock exist
<1> nix 2 [ ACC ] STREAM LISTENING 75064172 /var/lib/mysql/mysql.sock
<1> but still go the same erro
<2> Marre, I am sure...
<2> BeK, Sorry, I don't know...
<1> ok
<7> !perror 111
<3> System error: 111 = Connection refused
<6> will[werk]: What do you think about using a regex. would that be faster?
<2> Marre, No
<2> It still has to read each row.
<2> Marre, What are you trying to match?
<6> I have a big database of companies and company info.
<6> I would like to search for example *ercedes*
<6> and i should find mercedes. And i does. it just take some time.
<8> Marre: well, the db can not do magic. It would have to index every possible substring of every string in the database. That's a lot of index entries...
<2> Marre, No way to do that fast.
<2> Marre, I'm doing a LIKE %string% now, but it's in a MEMORY table.
<6> Duesentrieb, yes I know. but I was hopping I could somehow maybe index from letter 3-5 or something
<2> heh
<8> i don't think so.
<7> write your own index
<8> and you'd need 2-7 too, and 4-5, and...
<2> That wouldn't make any sense. You're better off creating another column, with that substring, and indexing that.
<2> That's ***uming you're always missing the first letter, or first two, etc.
<6> will[werk], I guess youre right
<2> :)
<6> Maybe If i reverse everything I want to search for a put it in another column. the I can check the query and just reverse it. the it would be faster
<2> Marre, Extract/denormalize a column or two, put it in a MEMORY table, and do LIKE %x%
<2> Only if you're checking the ending.
<2> In your Mercedes case, it wouldn't work for Mercedes-Benz
<6> but I need a lot more ram If i use a memory table
<2> Yeah
<7> just dont let typos in
<2> Marre, Well, RAM is cheap. But also, only put into memory the columns you need.
<6> I guess the users just have to wait a couple of seconds.
<2> heh
<2> If it's over the Web, it's perfectly normal.
<2> Network transfer speed is your limiting factor anyways.
<8> make an option: [x] substring search (slow)
<6> I have a lot of ram. I can fit any more. but the server does a lot of sql qry.
<2> How many columns do you want to search through? How many rows?
<6> Have anyone tried using solid state disks?
<6> colums depends. but around 20. rows around 7million
<2> That you want to search through? geez...
<6> yes i know
<6> it's big
<2> 64-bit is nice...



<6> willl i go faster if i split the database somehow.
<9> can a mysql4.x client connect to a mysql5 server?
<6> will it
<2> Sure
<2> Marre, Depends
<9> will a mysql4.x client connect to a mysql5 server?
<2> Marre, Sometimes.
<2> winmutt, Sure
<9> will_: no problems?
<6> seems like I have some thinking to do.
<2> There could be problems.
<9> have to use old pwd encryption?
<2> winmutt, What's the problem?
<9> i dont yet
<2> !m winmutt old client
<3> winmutt: (Client does not support authentication protocol) : http://dev.mysql.com/doc/mysql/en/Old_client.html
<2> If you're using a 4.0 client.
<9> but its time to upgrade to get views
<9> and other goodies
<2> You should upgrade the clients regardless.
<9> ya mostly 4.1 but some 4.0
<9> cant
<2> 4.0's will have problems. Follow guide.
<9> cant upgrade 2000 servers just because i want views
<2> Why not?
<10> yes you can
<9> ive read the old cient auth issue, and corrected for our 4.1 server
<6> will[werk]: thanks for the chat. take care.
<9> will_: because clients do what they want when they want and god knows what the have compiled against the old libraries
<9> clients being ppl that pay me money not mysql client
<2> winmutt, You do't have to correct for 4.1 clients. They are using the new schema.
<2> winmutt, heh ok
<11> how can i enable root to connect from "192.168.0.11"
<12> hi
<11> do i create a new account or enable it on the other?
<12> how long should it take to insert 14.000 rows into a table? (fields of the rows: 4x int)
<13> hi! How can I send an .sql file query to the sql server with ASP.NET? I know how to send a string command, but i have many complex .sql files necessary to initialize the sql database.
<11> do i create a new account or enable it on the other?
<14> hi
<13> hi
<14> i want to make al match against in one query
<14> by priority
<14> cl***ic one, then add IN QUERY EXPANSION
<14> i want to paste the Q2 at the bottom of the Q1 (Query) but with only unique result ?
<14> also i have to make this function, 1) IF data exist in DB then UPDATE hits ELSE INSERT data , can it be done in only one query ?
<2> !m HeliosTech insert
<11> how do i test MYSQL is working from PHP?
<3> HeliosTech: (INSERT Syntax) : http://dev.mysql.com/doc/mysql/en/INSERT.html
<2> HeliosTech, Look for "ON DUPLICATE KEY UPDATE
<2> Andy298, Check phpinfo(); to see if you have a mysql section.
<14> will[werk] great
<15> !delete
<15> !m mephistopheles delete
<3> mephistopheles: (DELETE Syntax) : http://dev.mysql.com/doc/mysql/en/DELETE.html
<11> ok - i don't! how can i enable it :)
<11> ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'mysql
<16> hello, i want mysql to bind to both 127.0.0.1 and its ***igned IP address? how do i get that?
<8> rene-: set the bind address to 0.0.0.0
<8> that will bind it to all interfaces
<2> Andy298, Ask in #php how to enable mysql support in PHP
<16> cool
<8> and consequently to all ip addresses
<2> rene-, no, comment it out.
<2> Why even have that option?
<8> will[werk]: why?
<2> That's my question :)
<2> Comment it out altogether.
<16> both solutions work for me, but is it possible to manually specify two ip addresses?
<2> No.
<16> cool
<2> You can only bind to one IP. But I guess 0.0.0.0 is special.
<8> yes, it means "all interfaces"
<11> ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'mysql
<9> my coworker thinks that triggers and views should not be part of a database


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

ubuntu phion
+share usb disk +samba
Gentoo Gtk WARNING **: cannot open display:
fluxbox 1.0 font big
python * argument dictionary tuples
Automatix Ubunut
lsagp
#debian
#css
python unscriptable object error



Home  |  disclaimer  |  contact  |  submit quotes