Re: name of a database in mysql....

2012-10-29 Thread Pintér Tibor

2012.10.29. 20:59 keltezéssel, FHDATA írta:



mysql server 5.1.41

hello

Is there a way mysql server can be told to disallow
any attempt of creating a database whose name contains
certain characters?

thanks,



make an empty dir in /var/lib/mysql with that name + chmod 000, owner 
!mysql :)


t

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Запрос

2011-04-28 Thread Pintér Tibor

On 04/28/2011 12:40 PM, Johan De Meersman wrote:

Я предлагаю более отчетливо английски применения :-p


could you guys stop talking alien language on the list, please?

t


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Get date from unix_timestamp only up to the hour

2011-02-24 Thread Pintér Tibor
On 02/24/2011 05:41 PM, Bryan Cantwell wrote:
 How would I go about modifying a unix timestamp to actually represent
 the 'top of the hour' that it represents?
 For instance:
 1296158500 = 1/27/2011 2:01:40 PM
 That is in the 2:00 pm hour, how can I find that out and modify it to
 1296158400 which = 1/27/2011 2:00:00 PM?

something like this:

mysql set @now:=now(), @foo:=unix_timestamp(); select @now, @foo, @foo
- minute(@now) * 60 - second(@now) as hour_unix, from_unixtime(@foo -
minute(@now) * 60 - second(@now));
Query OK, 0 rows affected (0.00 sec)

+-++++
| @now| @foo   | hour_unix  | from_unixtime(@foo -
minute(@now) * 60 - second(@now)) |
+-++++
| 2011-02-24 18:06:24 | 1298567184 | 1298566800 | 2011-02-24 18:00:00
 |
+-++++
1 row in set (0.00 sec)



t

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Get date from unix_timestamp only up to the hour

2011-02-24 Thread Pintér Tibor
On 02/24/2011 05:56 PM, Nathan Sullivan wrote:
 Bryan,
 
 Maybe something like this would work?
 
 select 1296158500 - (1296158500 % 3600)

ah, yes, even this one:

mysql select now() - interval (unix_timestamp() % 3600) second;
+---+
| now() - interval (unix_timestamp() % 3600) second |
+---+
| 2011-02-24 18:00:00   |
+---+
1 row in set (0.00 sec)

t

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Can't read dir of '.' (errno: 13)

2011-01-18 Thread Pintér Tibor
 mysql show databases ;
 ERROR 1018 (HY000): Can't read dir of '.' (errno: 13)
 mysql show databases;
 ERROR 1018 (HY000): Can't read dir of '.' (errno: 13)
 mysql

$ perror 13
OS error code  13:  Permission denied

t

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: dumping error

2010-02-06 Thread Pintér Tibor

2010.02.06. 12:00 keltezéssel, MuraliKrishna írta:

D:\mysqldump -u root -pdbadmin murali  murali.sql

'mysqldump' is not recognized as an internal or external command,

operable program or batch file.


could you stop blogging to the list, please?

t

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: MySQL being hacked with commands through URL

2009-11-18 Thread Pintér Tibor

James Coffman wrote:

Hello all,

My website has been hacked using a url such as:
-1%20union%20all%20select%201,2,concat(username,char(58),password),4,5,6%20f
rom%20users-- .

 


I have been searching on the web for a solution/fix to this issue and I
cannot seem to find one.  The command above is showing all usernames and
passwords (in hashes) and I am not comfortable with that at all!  Is there
anyone out there that may be able to help or may be able to point me in the
direction that I need to go in order to correct this issue?


http://en.wikipedia.org/wiki/SQL_injection

its not a mysql issue, but an application issue

t

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: How to change root password?

2009-11-15 Thread Pintér Tibor

Michael Wilson írta:

I am running MySQL 5 on OS X Snow Leopard...

Have it set up (by installing the pref pane) to always be running as soon as my 
MacBook starts.

For some odd reason, I can't remember the password I issued for root user and 
wish to either change it back to blank or a new specific password.

What should I type from the command line?

When I tried:


http://lmgtfy.com/?q=mysql+reset+root+password

t

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Creating a New DB / User

2009-05-13 Thread Pintér Tibor

Carlos Williams írta:

On Wed, May 13, 2009 at 11:15 AM, Michael Dykman mdyk...@gmail.com wrote:

One thing though: your user does not need the 'WITH GRANT OPTION' bit
as that gives them permission to gratn permissions to other users,
which I don't think is what you want.


How do I change the bit for 'grant all' via the CLI? What command
would I run to keep the user
as having full rights to the 'dublin' database but not being able to
grant other users permissions?



how about reading the fine  manual of the GRANT command at mysql.com?

t

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: How to count # of character occurrences in a string?

2008-10-24 Thread Pintér Tibor


I have a Char column with text data like ab:cdef:h and I'd like to 
count the number of : in the column. I can't find an easy way to do 
it. I thought there should be a MySQL function to do this. Any suggestions?


select length('aa:bb:cc:dd')-length(replace('aa:bb:cc:dd',':',''));

btw ever heard of google?

t

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'ODBC'@'localhost' (using password: YES)'

2008-10-04 Thread Pintér Tibor

Varuna Seneviratna írta:

I am using WinXP.I am wanted to shutdown MySQL service from the command line
and ran the command mysqladmin -p root shutdown next the root password was
asked for,I entered the correct password, when I entered the password the
below displayed error was the result

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'ODBC'@'localhost' (using password: YES)'



How can I correct this?
Is this because of a firewall preventing access to port 3306?If a firewall
is preventing access how was it able to ask for the password?

I have Nortan Internet Security trial version running and the windows
firewall is disabled.If this is caused by a firewall barrier please tell me
how to open the port in Nortan Internet Security.


1. Nortan - Norton
2. man mysql - mysql -ufoo -pbar

t

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: convert week of the year into a date string

2008-08-20 Thread Pintér Tibor


Ananda Kumar írta:

Hi All,
I think i worked on this and found the results.


I did the below.

1. Multiplied the week_of_the_year with 7 (7 days per week), to get the
total number of days from begning of the year.

2. used mysql function makedate
   makedate(year,number of days from the start of the year)
  makedate(2008,224)
select makedate(2008,224);
++
| makedate(2008,224) |
++
| 2008-08-11 |


this is definitely wrong, since you dont care about the fact that the 
frist day of the year is not always Monday


or do I misunderstand something?

t

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How do I get the file names from a certain directory in SQL?

2008-07-24 Thread Pintér Tibor



I accept that.. but my requirement is , I have some no of Excel files..I 
just need to check the modified time of the files ,if it is modified 
currently then I need to open those files and convert the excel data to 
database.. otherwise i didnt change anything in my database..


how can i going to achieve that?


most likely with a programming language like php, perl, c, whatever
(preferably with the one you tickle your sql)

t

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Selecting rows by DATE ranges

2007-06-24 Thread Pintér Tibor

date(), date_format()

t

Miguel Cardenas írta:

Hello list

I found a little problem with an application am developing, in particular 
creating reports by DATE ranges.


Examples:

select ... where date2007-01-01;
returns all records where date is greater (and equal inclusive) to 2007-01-01

select ... where date=2007-01-01;
returns all records where date is greater/equal to 2007-01-01

the  and = have the same effect

select ... where date2007-01-01 and date2007-01-20;
returns all records where date is greater/equal to 2007-01-01 and less 
than 2007-01-20

*** DOES NOT RETURN RECORDS FROM DAY *20*

select ... where date2007-01-01 and date=2007-01-20;
returns all records where date is greater/equal to 2007-01-01 and less 
than 2007-01-20 although I'm using =

*** DOES NOT RETURN RECORDS FROM DAY *20*

My doubts are:

1. how can I retrieve rows with a date... NOT INCLUDING the day of the 
specified date, I mean apply a strict GREATHER THAN


2. how can I retrieve rows with date=... INCLUDING the day of the specified 
date. currently I have to do a date=date1 and date=date2+1day


I need to retrieve rows in this way

dateX
date=X
dateX
date=X
dateX and dateY
date=X and dateY
date=X and date=Y
dateX and date=Y

and so... didn't find a function to specify ranges of dates and the LESS 
THAN/EQUAL operator does not include the last day, so my reports with = 
are done by adding one day but don't like to use it this way since it could 
be confusing and generate errors on reports.


Thanks for any comment,
Miguel



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Sort Select by List

2006-12-16 Thread Pintér Tibor

Keith Spiller írta:

Hello,

RE:  Sort Select by List

I'm wondering how I would turn three different queries:

SELECT * FROM team WHERE office = 'Exec'
SELECT * FROM team WHERE office = 'VP'
SELECT * FROM team WHERE office = 'Dir'

Into one query with the sort order of office = 'Exec', 'VP', 'Dir'...
Thanks,


Keith
  


order by right(office,1)

or make an extra column for ordering

t

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]