@# 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 22 23 24 25



Comments:

<0> danf_1979: and the server character set and server collation should be sufficient
<1> init-connect='SET NAMES utf8'
<1> character-set-server=utf8
<1> collation-server=utf8_general_ci
<1> I have this, so it should be fine then?
<1> in my.cnf
<0> danf_1979: but the init-connect does not apply to user with SUPER privilege
<1> Are there any other directives to use then?
<1> daeos, I'll look onto it and let you know if I fix it
<0> danf_1979: try show create database test;
<2> hrm
<2> I need to come up with a talk idea for PHP|Works 2006
<2> I want to do something mysql-related
<1> runnit as an sql query? it brings up an error... headers already sent
<2> I want to do a plurality of things mysql-related, if possible



<0> danf_1979: show create database test
<0> danf_1979 as a sql statement
<1> CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER ...
<1> thats it
<0> you see utf8 ?
<1> CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET latin1 */
<1> :/
<3> hi there
<3> having a problem with a query
<1> work is not over yet, it seems
<0> danf_1979: try show variables like 'character%'
<1> :(
<0> danf_1979: look at the server character set
<3> UNIONS and INNER JOINS
<1> character_set_client utf8
<1> character_set_connection utf8
<1> character_set_database latin1
<1> character_set_results utf8
<1> character_set_server latin1
<1> character_set_system utf8
<1> character_sets_dir /usr/share/mysql/charsets/
<0> hmm, the server charset is latin1 not as what you specified in the my.cnf
<0> set names does work here
<1> Uhm, maybe a phpmyadmin issue?
<0> set names does work here
<0> <d
<0> danf_1979: need to restart mysql server after changing the my.cnf
<1> yes I did
<1> root@www:/home/dan# /etc/init.d/mysql restart
<1> Stopping MySQL database server: mysqld.
<1> Starting MySQL database server: mysqld.
<1> Checking for crashed MySQL tables in the background.
<2> I think MySQL should hire me and then I can just go around the continent giving presentations
<0> maybe it is _ and not -
<1> uhm? I didn't get that lokus
<1> what about - _?
<0> character-set-server and character_set_server
<3> lokus: have 30s to answer a sql problem?
<0> Darien: mayeb you missed the boat, mysql was looking for a community relations manager earlier but the post is filled
<0> Epilog: jsut ask
<1> Nope, same result
<3> lokus: I have a table with column groupname, createJob, createUser, etc
<0> danf_1979: maybe mysql server is not reading the my.cnf file
<3> lokus: I have 4 groups of groupname and I would like to get a query like, createJob [1] -> count(group1) WHERE group1='aa', count(group2) WHERE group2='bb', ..
<1> Uhm, maybe, dont know for shure
<1> sure
<3> lokus: same for row with createJob 3, 4, etc
<0> !m Epilog control flow
<4> Epilog: (Control Flow Functions) : http://dev.mysql.com/doc/mysql/en/Control_flow_functions.html
<0> Epilog: this may helps in most situation like yours
<3> lokus: I was trying with inner joins and unions
<1> checkout this
<1> https://www.mundohosting.cl:81/tutorial/pic2.png
<0> Epilog: no need inner join and no need union, just a simple select
<1> daeos, is my phpmyadmin configuration similar to yours?
<1> check out the picture
<1> https://www.mundohosting.cl:81/tutorial/pic2.png
<0> danf_1979: if everythnig fail, you can always do Create database test default charset utf8
<1> Ok, I'll write that down, but I really need this to be automated, bcause I use ISPConfig for creating databases



<1> I could then modifiy them, but it would be better not have yo
<1> to
<0> danf_1979: maybe you can also do , set global character_set_server=utf8 then reconnect
<0> but mn.cnf settings is much better
<1> It did not let me do that
<1> MySQL said: Documentation
<1> #1105 - Binary logging and replication forbid changing the global server character set or collation
<1> Ok, I'm going to google it for a while
<3> lokus: http://pastebin.com/630020 something like this
<1> Ok, google solve it
<1> I added
<1> default-character-set=utf8
<1> character-set-server = utf8
<1> collation-server = utf8_general_ci
<1> to [mysqld]
<1> I'm going to paste the config in paste bin if you want to see it
<0> danf_1979: no need
<1> Ok,
<5> hi. i just got a new install of mysql 5.0 running, but I'm getting errors trying to describe tables in the mysql database as the mysql root user
<5> ERROR 1 (HY000): Can't create/write to file '/root/tmp/#sql_1a20_0.MYI' (Errcode: 13)
<5> anyone know how to fix?
<0> Epilog: you need sum(if()) grouop by something along this line
<0> !perror 13
<4> System error: 13 = Permission denied
<3> lokus: what if I have 50 createJobs?
<5> i know it's permission denied, but how do i fix this? never had this problem with 4.1.2
<0> Epilog: are you grouping by createdjobs?
<3> yep
<0> danh: file permission on the os
<5> for what? /root/tmp/?
<0> yes
<5> i did that
<5> still doesnt work
<3> lokus: http://pastebin.com/630028
<0> Epilog: deos not matter how many createdjobs
<1> thanks lokus for your time and patience
<0> Epilog: do something like sum(if(groupname='hotspot',1,0)) to count the different hotspot
<3> lokus: good idea
<6> I NEED HELP PLEASE what's this error? server is up under linux, and I receive this message when i try to query thru Ruby, how i can solve this kind error: Mysql::Error: Lost connection to MySQL server during query: SHOW FIELDS FROM users
<5> lokus: i don't think the tmp dir for mysql should be in /root. and i have no my.cnf file that i can find.
<0> danh: show variables like 'tmpdir';
<0> danh: thsi shows the dir mysql is using for temporary
<0> danh: you can set it to whichever dire you want to
<3> lokus: got it
<7> probably set to "tmp" instead of "/tmp"
<3> lokus: SELECT createJob, createUser, createDate, SUM(IF(u.GroupName = 'Hotspot', 1, 0)) AS Hotspot, SUM(IF(u.GroupName = 'Hotspot_Dia', 1, 0)) AS Hotspot_Dia, SUM(IF(u.GroupName = 'Hotspot_Mes', 1, 0)) AS Hotspot_Mes, SUM(IF(u.GroupName = 'Hotspot_Bonus', 1, 0)) AS Hotspot_Bonus FROM usergroup u WHERE createJob IS NOT NULL GROUP BY createJob
<7> and started from /root
<5> Therion!
<5> it's empty, btw
<5> i.e. tmpdir
<7> and started from /root
<7> errr
<5> so if I want to change tmpdir, the query should be "set tmpdir = '/tmp'"?
<7> have to set it in my.cnf and restart, but if blank it should be going to /tmp
<7> so, weird that it is not
<5> i got some error on install of the mysql rpms
<5> also about /root/tmp
<5> errors
<5> okay, made a my.cnf and added new tmpdir. works fine now.
<8> subquery question: query 1 is: SELECT blah_id,field2,field3 from table1 ; query2 is SELECT blah_id WHERE field4 = "value" ....how do i join them so that whtne blah_id from query 2 is the WHERE or whatever for query 1?
<9> What's the fastest way of checking if any records match? I don't need the data, only if there is any matching .. and I don't care how many ..
<9> LIMIT doesn't seem to stop when it finds the first N .. unless I'm mistaken
<10> limit 1
<9> Mm .. must not work when there's a join
<11> i am having some problems with my query that i am writing. when run as it it shows the same record multiple times when i only want it to show it one time. here is the pastebin link to it http://pastebin.com/630073
<10> exclude 'order by', 'group by', 'having'
<9> yeah, got none of thsoe
<9> gah
<9> inherrent group :)
<9> select count(*) ... limit 1
<10> a join is just attaching a field to a "matched" record
<10> you could do a WHERE join.id IS NOT NULL
<8> hrm
<9> This still takes a LONG time: SELECT l.id FROM message_log l JOIN message_recips r ON (l.id = r.message_id) WHERE (l.company_id = 1484 AND r.company_id = 0) OR (l.company_id = 0 AND r.company_id = 1484) LIMIT 1;


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

kde disabling conponents debian
#ubuntu
cafaiene
what is gadost
mod_python import local module
#ubuntu
debian amd64 hp dl380
app.pid: Permission denied
dapper teamspeak sources.list
#physics



Home  |  disclaimer  |  contact  |  submit quotes