timezone

2011-06-03 Thread Rocio Gomez Escribano
Hello! I’m having trouble with timezones. I’m in Spain, we have 2 different timezone now we are in GMT+2, in winter, this is the GMT+1. I’m looking for an instruction which give me the current timezone, but I cant find it! Do you know how can I now it? Thanks! Rocío Gómez Escribano

Re: timezone

2011-06-03 Thread John Daisley
Have you populated the timezone tables? Run this query if you are not sure. *SELECT COUNT(*) FROM mysql.time_zone_name;* * * ***If it returns 0 then you need to populate the them as per the instructions here http://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html* Default timezone in mysql

RE: timezone

2011-06-03 Thread Rocio Gomez Escribano
I’m afraid I don’’t understand you: mysql select count(*) from mysql.time_zone_name; +--+ | count(*) | +--+ |0 | +--+ 1 row in set (0.00 sec) But, when I execute: mysql select now(); +-+ | now() |

Allowing all users to access a specified database

2011-06-03 Thread Mark Goodge
Hi, I have a database server with multiple users and multiple databases. I have a situation where I want to allow any user to connect to a specified database. Unfortunately, the documentation has this to say: MySQL does not support wildcards in user names. Which means, that, although I can

Re: timezone

2011-06-03 Thread John Daisley
now() returns the current system time which doesn't really have a great deal to do with time zones. You can check what the current time zone is set to with the following command *show variables like 'time_zone';* but that is likely to return the value '*SYSTEM*' which means it takes the value

Re: Allowing all users to access a specified database

2011-06-03 Thread John Daisley
The reason *GRANT SELECT, INSERT, UPDATE, DELETE ON mydyb TO '%'@'%';* * * does not work is because that command would be suicidal in terms of security. If you are hosting a large number of ecommerce sites and granting any user access to those databases then you would want security to be far

Re: Allowing all users to access a specified database

2011-06-03 Thread Johan De Meersman
While it does not support wildcards, it does support an empty username field. A subtle distinction :-) Simply grant access to ''@'%'. - Original Message - From: Mark Goodge m...@good-stuff.co.uk To: mysql@lists.mysql.com Sent: Friday, 3 June, 2011 12:03:56 PM Subject: Allowing all

Re: timezone

2011-06-03 Thread Johan De Meersman
I would also like to point out, as an aside, that Spain doesn't actually have two timezones - it has a single timezone with daylight savings time. The real question is, thus, to figure out wether or not you are on DST or not. That, however, I have no idea how to do - the system takes care of

Re: timezone

2011-06-03 Thread John Daisley
To take account of daylight savings time in MySQL, load the time zone tables and set the `default_time_zone` variable to the named time zone for your country. On 3 June 2011 11:37, Johan De Meersman vegiv...@tuxera.be wrote: I would also like to point out, as an aside, that Spain doesn't

Re: Allowing all users to access a specified database

2011-06-03 Thread Mark Goodge
On 03/06/2011 11:24, John Daisley wrote: The reason *GRANT SELECT, INSERT, UPDATE, DELETE ON mydyb TO '%'@'%';* * * does not work is because that command would be suicidal in terms of security. If you are hosting a large number of ecommerce sites and granting any user access to those databases

Re: Allowing all users to access a specified database

2011-06-03 Thread John Daisley
You could easily write a script which queries the mysql grant tables and grants the required permissions to every user on your system. Granting access the way you were suggesting gives the whole world access not just users of the system. That said as that is a shared database which all users are

Re: Allowing all users to access a specified database

2011-06-03 Thread Johan De Meersman
Granting to ''@'%' and putting a password on that 'user' works fine - the password stops just anyone from getting in; but the emtpy username in the db table should get picked up fine, as authentication and authorisation are disctinct in MySQL. - Original Message - From: John Daisley

RE: timezone

2011-06-03 Thread Jerry Schwartz
From: John Daisley [mailto:daisleyj...@googlemail.com] Sent: Friday, June 03, 2011 6:09 AM To: Rocio Gomez Escribano Cc: mysql@lists.mysql.com Subject: Re: timezone now() returns the current system time which doesn't really have a great deal to do with time zones. [JS] I think that

Bug using 32-bit libmysqlclient on a 64-bit system?

2011-06-03 Thread Alex Gaynor
I've got a 64-bit Linux system, with a 32-bit libmysqlclient (and a 64-bit), and a C program using the libmysqlclient API which behaves very differently depending on which platform it is compiled for. The program is: #include stdio.h #include string.h #include mysql.h int