| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Comments:
<inviso> RHEL3 is fun ;) <inviso> And 4 doesn't even bother to install on a large number of dell poweredge boxes. I had to sacrifice one of our abundant local squirrels to get it to install <BoBB> BartVB, awesome man :-) I thought I was gonna have to write a php script to strtoupper each one! <BartVB> mysql is pretty flexible when it comes to (not extremely complex) manipulation of your data <BoBB> how about alpha numeric only? no punctuation and such <Dr-Linux> hi guys <Dr-Linux> question, can i use MySQL server on differnet Linux machine? <infi> -h host <Dr-Linux> anybody answer? <infi> Dr-Linux: -h host <BoBB> Dr-Linux, yes you can, as long as it has remote connections enabled <Dr-Linux> infi: what do you mean by -h host? :S <infi> change your connection string to include the host in $your_programming_language, or use -h host with the CLI client. <Dr-Linux> BoBB: actually i have 2 server both are identical, one is ready with everything, the other server is very critical, so i wanna use same Mysql database for 2nd serer as well <BoBB> just set whatever piece of software you have to connect to that servers IP address instead of localhost <Dr-Linux> BoBB: great. and what other things will be changed? <BoBB> that should be all you need to change to connect to a seperate server, unless it runs on a seperate port, but if they are identical like you say that should be it <BoBB> you may also need to go into the my.cnf and enable remote connections <Dr-Linux> hhm.. <Dr-Linux> BoBB: where is my.cnf? <Dr-Linux> location <Dr-Linux> let me check <BoBB> depends, generally its in /etc/mysql, but it could be anywhere depending on the system you are running <Dr-Linux> ok <Dr-Linux> let me see <Dr-Linux> BoBB: its here >> cd /etc/my.cnf <BoBB> there you go <Dr-Linux> BoBB: do i need edit this file on mysql server machine or non-mysql ? <BoBB> whichever run the server you are trying to connect to is on <Dr-Linux> BoBB: but this file is empty? :S <Dr-Linux> [root@I2C-PBX root]# locate my.cnf <Dr-Linux> /etc/my.cnfcopy <Dr-Linux> /etc/my.cnf.rpmsave <myuo> Hi, I am using mysql via TCP (do not use socket raw), but to connect I need to use this mysql -h 127.0.0.1 -u root, it's possible to say 'do not use socket raw' and connect only via -u root ? any idea? <BoBB> Dr-Linux, it souds like your my.cnf is either non-existent or located somewhere else <Juzzy> myuo: p*** it -P 3306 <danq> blargh. <Dr-Linux> BoBB: i have many servers, should i copy this file from anywhere else to this? :S <myuo> /opt/mysql/bin/mysql -u root -P 3306 -p <myuo> Enter p***word: <myuo> ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) <myuo> same error, is mandatory for my use -h 127.0.0.1 why? <BoBB> Dr-Linux, no idea, i believe network connections is on by default ... I would just try it first <BoBB> Dr-Linux, from the command line, mysql -h ip.add.re.ss -u <user> -p <myuo> Juzzy any idea? <inviso> myuo: mysql --help gives --protocol. Take a look. <Dr-Linux> BoBB: you mean from here? <Dr-Linux> mysql> <BoBB> Dr-Linux, no, from a terminal command line on a server other than the one you want to connect to <myuo> the problem is not on the protocol, I need to use -h 127.0.0.1 and works, my question is why? <myuo> /opt/mysql/bin/mysql -u root -P 3306 -p <myuo> Enter p***word: <myuo> ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) <myuo> ireth:~# /opt/mysql/bin/mysql -u root -P 3306 -p -h 127.0.0.1 <myuo> Enter p***word: <myuo> Welcome to the MySQL monitor. Commands end with ; or \g. <Dr-Linux> hhm... okey let me try :S <myuo> you know? <shabbs> myuo: try using a pastebin next time instead of flooding the channel <myuo> ok <inviso> myuo: It connected? What is the problem exactly? <myuo> sorry <shabbs> myuo: your problem is is that the socket isn't configured correctly for the client <myuo> why do I need to use -h 127.0.0.1? it's possible to use it in my.cfn or something like this? <danq> Anyone have any tips and/or tricks for improving performance under Cluster? My queries are extremely slow, many times slower than running the same queries on a standalone MySQL server. I'm not able to identify where I may have misconfigured something. <myuo> I use TCP, so, what's the way to say do not use socket? <shabbs> inviso myuo: mysql --help gives --protocol. Take a look. <myuo> shabbs>ç I don't understand you, sorry <shabbs> myuo: don't understand me, understand inviso, he told you the answer already <BoBB> is there a mysql function to select data out of a database and not include any non-alphaumeric characters, or a way to replace a particular list of strings with nothing? <myuo> :( <myuo> so, what is the way to say under my.cnf do not use socket ? <Dr-Linux> BoBB: i'm getting this error <Dr-Linux> Enter p***word: <Dr-Linux> ERROR 1130: #HY000Host '70.89.66.123' is not allowed to connect to this MySQL server <archivist> fix your socket its faster <BoBB> Dr-Linux, that means that that server is not accepting outside network connection <infi> BoBB: incorrect. <myuo> but I use mysql under chroot, so php cannot find it <infi> Dr-Linux: you need to grant that user@host access to the database. <Dr-Linux> :S <infi> !m dr-linux grant <SQL> dr-linux: (GRANT and REVOKE Syntax) : http://dev.mysql.com/doc/mysql/en/GRANT.html <danq> Huh. Is there such thing as a multi-multi-multi-master replication setup or something like that? <BoBB> Dr-Linux, ahh yes, infi is correct, each user has a specific host it is allowed to connect from <infi> Dr-Linux: it *is* in fact, listening to outside connections (which really isn't a good idea to leave unfiltered). however, you need to add a host entry for that user@host. <Dr-Linux> :S <Dr-Linux> can you guys help me to add a user and database for this connection? <infi> !m dr-linux grant <SQL> dr-linux: (GRANT and REVOKE Syntax) : http://dev.mysql.com/doc/mysql/en/GRANT.html <inviso> !m Dr-Linux adding users <SQL> Dr-Linux: (Adding New User Accounts to MySQL) : http://dev.mysql.com/doc/mysql/en/Adding_users.html <inviso> both links are helpful <Dr-Linux> actullay english is not my native lanugae so i don't understand good web guides :( <inviso> !m BoBB REPLACE <SQL> BoBB: (REPLACE Syntax) : http://dev.mysql.com/doc/mysql/en/REPLACE.html <inviso> !m BoBB string functions <myuo> host=127.0.0.1 using this fix the problem :) <SQL> BoBB: (String Functions) : http://dev.mysql.com/doc/mysql/en/String_functions.html <Dr-Linux> :S <inviso> BoBB: ignore the first link. search for replace in the second link <infi> dr-linux: thankfully, the docs are in multiple languages! <BoBB> thanks guys, read through the strings page twice and didn't see the replace, been a loooong day =/ <inviso> BoBB: it's not a great solution, but it doesn't appear we have something like translate :( <BoBB> well, my boss told me he needed it to do that about a week after they started entering data into the database, quick and dirty is about all I can do now heh <inviso> BoBB: if it's just for cleanup, go for it. Otherwise, I think performance will be a bit... lacking.. if you have a large translation table <danq> is there a way that I can be show a list of the most frequently used queries, statements, etc etc? <infi> danq: log them. <danq> --log= ? <BoBB> inviso, what i'm thinking is modify the script to not allow those characters, and then use this query to go through and select and replace each value already in there <inviso> danq: Not that I'm aware of. You can get long running ones or a log of all queries. No summaries really though <inviso> BoBB: sounds like a good plan <danq> aholmes, ok. <BoBB> inviso, i'm confused though, how does one use SELECT REPLACE('www.mysql.com', 'w', 'Ww'); to perform that on a value being selected from a database? <inviso> BoBB: note that you can do, update table set col=replace(replace(replace(col, 'a', '1'), 'b', '2'), 'c', '3') if you want to translate all 'a' into '1', 'b' into '2', etc. You can nest it as deep as you need for a cleanup like this <danq> Last_query_cost | 10.499000 <danq> Anyone care to elaborate on that one more than what the manual already does? <inviso> BoBB: you'd use update rather than select <BoBB> so pull them all out, and foreach value update REPLACE('$value', 'uwnanted character', '') <infi> danq: that means you owe MySQL AB 10.49 Euros for the last query. <danq> Excellent. <Dr-Linux> BoBB: i have added user, how can i see the users list? <inviso> BoBB: nope. Don't even bother pulling them into php <infi> actually, e10.50, that would round up. <Dr-Linux> and also how can i add database? :S <inviso> Dr-Linux: select * from mysql.user; <inviso> !m Dr-Linux create database <SQL> Dr-Linux: (CREATE DATABASE Syntax) : http://dev.mysql.com/doc/mysql/en/CREATE_DATABASE.html <inviso> Dr-Linux: please do a little searching on your own or read the tutorial <infi> dr-linux: read a tutorial, please. <Dr-Linux> oo yes it's there and added <Dr-Linux> ERROR 1251: Client does not support authentication protocol requested by server; consider upgrading MySQL client <Dr-Linux> :( <BoBB> inviso, how do I refer to it's own string when doing an update? <inviso> BoBB: your cleanup is seriously just a single sql statement. UPDATE some_table SET col=REPLACE(REPLACE(col, '#', ''), '!', ''); That's given that # and ! are illegal characters and should be "removed" <Dr-Linux> may be it can be soloved by changing p***word :S <inviso> !m Dr-Linux old client <SQL> Dr-Linux: (Client does not support authentication protocol) : http://dev.mysql.com/doc/mysql/en/Old_client.html <BoBB> inviso, wow, thats spanktastic! <inviso> BoBB: yup. Just don't figure on running that alot :) <danq> So if I run an ALTER TABLE query against a database to add a field as an index, can I expect a new index to be created using existing data, or will this only work for data which has been added AFTER I ran the ALTER TABLE query? <myuo> invisio, socket is much faster than tcp ? <myuo> unix socket <inviso> myuo: yes <Silivrenion> I backed up my databases with mysqldump <Dr-Linux> !m Dr-Linux how to create tables <SQL> Dr-Linux: Nothing found <Silivrenion> i need to put them in another mysql server, but it says "unknown databases soandso" <myuo> inviso: If I use tcp on localhost is bad idea? <Dr-Linux> :S
Return to
#mysql or Go to some related
logs:
#fluxbox #lisp ai tictactoe mxm programming #css #lisp suse 10.0 miniboot how to use chpasswd gentoo Q.A. ECLASS 'libtool' inherited illegally
#sdl #bash
|
|