RE: How to block SELECT * FROM table; but not SELECT * FROMT table WHERE...;

2012-09-24 Thread abhishek jain
Hi,
Or if you are interested in limiting the number of rows add a limit clause,
so that entire resultset of entire table is not returned ,

I am not sure how will that be done , but i have seen some GUIs doing that,
would look for a solution from group.

Thanks
Abhishek 

 -Original Message-
 From: Martin Gainty [mailto:mgai...@hotmail.com]
 Sent: 24 September 2012 04:58
 To: fuller.art...@gmail.com; pownall...@gmail.com
 Cc: mysql@lists.mysql.com
 Subject: RE: How to block SELECT * FROM table; but not SELECT * FROMT
 table WHERE...;
 
 
 Possibly run your constructed query thru a regex expression e.g.
 String mydata = SELECT * from table WHERE ab;; Pattern pattern =
 Pattern.compile('WHERE'); Matcher matcher = pattern.matcher(mydata);
 if (matcher.find()) {  //WHERE clause found proceed normally } else
 throw new Exception(WHERE clause not found); Martin
 __
 Verzicht und Vertraulichkeitanmerkung/Note de déni et de
 confidentialité
 
 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
 Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
 unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig.
 Diese Nachricht dient lediglich dem Austausch von Informationen und
 entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten
 Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt
 uebernehmen.
 Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas
 le destinataire prévu, nous te demandons avec bonté que pour satisfaire
 informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
 copie de ceci est interdite. Ce message sert à l'information seulement
 et n'aura pas n'importe quel effet légalement obligatoire. Étant donné
 que les email peuvent facilement être sujets à la manipulation, nous ne
 pouvons accepter aucune responsabilité pour le contenu fourni.
 
 
  Date: Sun, 23 Sep 2012 18:38:58 -0400
  Subject: Re: How to block SELECT * FROM table; but not SELECT * FROMT
  table WHERE...;
  From: fuller.art...@gmail.com
  To: pownall...@gmail.com
  CC: mysql@lists.mysql.com
 
  Tim,
 
  I think you misunderstood the question. Daniel wants to block Select
  queries that ask for all rwows, and permit only queries that ask for
  some rows, as restricted by the Where clause.
 
  Unfortunately, I don't think that can be done. But I'm not certain of
  that; there might be a trick.
 
  Arthur
  www.artfulsoftware.com
 
  On Sun, Sep 23, 2012 at 3:50 PM, Tim Pownall pownall...@gmail.com
 wrote:
 
select * from table where column=value means it will return only
   rows that match.  as long as you have proper indexing there should
 not be any issues.
  
   On Sun, Sep 23, 2012 at 1:23 PM, Luis Daniel Lucio Quiroz 
   luis.daniel.lu...@gmail.com wrote:
  
  
 


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



[ask] count items in the SET(value1,value2,value3)

2012-09-24 Thread Morning Star
Hi guys,
i created a table, one of column named categories contain SET as its
data type. let's say there are N-value in that column.
i inserted a row to that column which contain only 5 values.
INSERT INTO table SET categories ='value1, value2, value3, value4, value5' ;
the question is: how can i count that items ( value1 till value5) ?

Greetings,

Marco

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



Doubt Regd. Circular Replication In Mysql

2012-09-24 Thread Adarsh Sharma
Hi all,

Today i set up a circular replication between three nodes A,B  C
successfully.
I expect whatever writes on A will propagated to B  then Propagated to C
because the structure is like below :-

A - B -  C - A

I created a sample table stag in test database in A and insert few records
that are also replicated to B but not to C. Now when i created the same
table in C , it shows errors in show slave status\G output in A node.

I needed this setup because all these servers are in different  colos so
that whatever writes to any node would replicated to others also for one
database.

I followed the below  link for setting this circular replication :-

http://www.howtoforge.com/setting-up-master-master-replication-on-four-nodes-with-mysql-5-on-debian-etch-p2

Is it possible to achieve whatever i needed or i need to create Multi
Master set up 2 nodes only.

Thanks


secure user name for MySQL account?

2012-09-24 Thread Rajeev Prasad
I am considering using cryptic username for accessing and working on a database 
on my MySQL installation. can anyone with experience provide some suggestion pl?

in documentation, i only see that it can be 16 char long. how complex it can 
be? any side effects/bugs of username complexity? can I use special characters 
in name?


please advice.


ty.


RE: Doubt Regd. Circular Replication In Mysql

2012-09-24 Thread Stillman, Benjamin
Sounds like you're missing the following in your my.cnf on server B (probably 
all of them):

replicate-same-server-id = 0
log-slave-updates

While you're checking, might as well as make sure your auto-increment settings 
are in there and correct also.




-Original Message-
From: Adarsh Sharma [mailto:eddy.ada...@gmail.com]
Sent: Monday, September 24, 2012 10:23 AM
To: mysql@lists.mysql.com
Subject: Doubt Regd. Circular Replication In Mysql

Hi all,

Today i set up a circular replication between three nodes A,B  C successfully.
I expect whatever writes on A will propagated to B  then Propagated to C 
because the structure is like below :-

A - B -  C - A

I created a sample table stag in test database in A and insert few records that 
are also replicated to B but not to C. Now when i created the same table in C , 
it shows errors in show slave status\G output in A node.

I needed this setup because all these servers are in different  colos so that 
whatever writes to any node would replicated to others also for one database.

I followed the below  link for setting this circular replication :-

http://www.howtoforge.com/setting-up-master-master-replication-on-four-nodes-with-mysql-5-on-debian-etch-p2

Is it possible to achieve whatever i needed or i need to create Multi Master 
set up 2 nodes only.

Thanks



Notice: This communication may contain privileged and/or confidential 
information. If you are not the intended recipient, please notify the sender by 
email, and immediately delete the message and any attachments without copying 
or disclosing them. LBI may, for any reason, intercept, access, use, and 
disclose any information that is communicated by or through, or which is stored 
on, its networks, applications, services, and devices.

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



Re: secure user name for MySQL account?

2012-09-24 Thread Johan De Meersman


- Original Message -
 From: Rajeev Prasad rp.ne...@yahoo.com
 
 I am considering using cryptic username for accessing and working on
 a database on my MySQL installation. can anyone with experience
 provide some suggestion pl?

Why would you make your life hard by using cryptic usernames? Have the username 
(and db name) reflect the project it's used in or the user it belongs to, make 
sure you have a properly complex password, allow only from appropriate hosts 
and set up restrictive firewall rules. If you know how many simultaneous 
connections the application can make, you can also restrict that.


 in documentation, i only see that it can be 16 char long. how complex
 it can be? any side effects/bugs of username complexity? can I use
 special characters in name?

Avoid reserved names, also best to avoid question marks and percent signs as 
those are wildcards in some situations - even though (I think) they're not 
actually interpreted unless the user name is a single percent sign. Apart from 
that, nothing much except the 16-character limit, I think.


-- 
Linux Bier Wanderung 2012, now also available in Belgium!
August, 12 to 19, Diksmuide, Belgium - http://lbw2012.tuxera.be

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



RE: Doubt Regd. Circular Replication In Mysql

2012-09-24 Thread Stillman, Benjamin
replicate-same-server-id = 0 keeps MySQL from replicating binary log entries 
from itself. For instance, here's a rough overview:

You write to Server A.
Server A writes that to its binary log.
Server B reads Server A's binary log and completes the same thing.
Because log-slave-updates is enabled, Server B writes it to its own binary log.
Server C reads Server B's binary log and completes the same thing.
Again, with log-slave-updates enabled, Server C writes it to its own binary log.
Server A reads Server C's binary log.

Here's where the issue starts. Without replicate-same-server-id = 0, Server A 
will complete the insert/update/delete as it reads it from Server C's binary 
log. However, this query originated from Server A, so it's just going to do it 
again. Then it's again replicated to Server B, Server C, and so on. This can 
create a loop and/or break replication. For instance, if you drop a table on A. 
It replicates across, and back to A. Replication will error out because when it 
tries to drop the same table again, it already doesn't exist. You need 
replicate-same-server-id = 0 set so that it knows not to execute any binary log 
entries with its own server ID.



From: Adarsh Sharma [mailto:eddy.ada...@gmail.com]
Sent: Monday, September 24, 2012 10:39 AM
To: Stillman, Benjamin
Subject: Re: Doubt Regd. Circular Replication In Mysql

Yes I fixed , but i solve the issue by enabling log-slave-updates only
Why we use the below parameter :-
replicate-same-server-id = 0

Ya i configured auto-increment settings properly.

Thanks

Thanks
On Mon, Sep 24, 2012 at 8:03 PM, Stillman, Benjamin 
bstill...@limitedbrands.commailto:bstill...@limitedbrands.com wrote:
Sounds like you're missing the following in your my.cnf on server B (probably 
all of them):

replicate-same-server-id = 0
log-slave-updates

While you're checking, might as well as make sure your auto-increment settings 
are in there and correct also.




-Original Message-
From: Adarsh Sharma [mailto:eddy.ada...@gmail.commailto:eddy.ada...@gmail.com]
Sent: Monday, September 24, 2012 10:23 AM
To: mysql@lists.mysql.commailto:mysql@lists.mysql.com
Subject: Doubt Regd. Circular Replication In Mysql

Hi all,

Today i set up a circular replication between three nodes A,B  C successfully.
I expect whatever writes on A will propagated to B  then Propagated to C 
because the structure is like below :-

A - B -  C - A

I created a sample table stag in test database in A and insert few records that 
are also replicated to B but not to C. Now when i created the same table in C , 
it shows errors in show slave status\G output in A node.

I needed this setup because all these servers are in different  colos so that 
whatever writes to any node would replicated to others also for one database.

I followed the below  link for setting this circular replication :-

http://www.howtoforge.com/setting-up-master-master-replication-on-four-nodes-with-mysql-5-on-debian-etch-p2

Is it possible to achieve whatever i needed or i need to create Multi Master 
set up 2 nodes only.

Thanks


Notice: This communication may contain privileged and/or confidential 
information. If you are not the intended recipient, please notify the sender by 
email, and immediately delete the message and any attachments without copying 
or disclosing them. LBI may, for any reason, intercept, access, use, and 
disclose any information that is communicated by or through, or which is stored 
on, its networks, applications, services, and devices.



New Fast Server Now Available at GoGrid.com

2012-09-24 Thread Hiromichi Watari
Parallel Universe* is now available as part of Linux OS images at 
www.GoGrid.com.
GoGrid.com is a dedicated/cloud server hosing site.

--

*Parallel Universe is a new extension to MySQL server architecture, created to 
provide fast parallel query capability.
Speed is achieved by processing tables in parallel, utilizing multiple core/CPU 
of server hardware.

Because of fast query processing being available to data analysis, it is an 
ideal data warehouse server.
With Parallel Universe, you'll also be able to deploy less costly server 
hardware for the same query load/task.

Parallel Universe is released under the GPL license and fully compatible with 
MySQL and Percona servers.

Also available at www.paralleluniverse-inc.com

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



RE: How to block SELECT * FROM table; but not SELECT * FROMT table WHERE...;

2012-09-24 Thread Rick James
Even if you could block them, they would be easy to get around:
  SELECT * FROM tbl WHERE 1;

If you have long running queries, you should investigate the reasons (other 
than lack of WHERE).

* MyISAM locks the table for any writes.  This prevents a SELECT from starting 
or a select can prevent the INSERT/UPDATE/DELETE from starting.  Consider 
switching to InnoDB.

* How big is the table?  Why does the user want the whole table (if it is a 
plain SELECT *)?  If you are doing Data Warehousing, consider summary tables.

Let's see the big picture; I expect there is a way to solve the _real_ problem, 
which I guess is performance.

 -Original Message-
 From: Arthur Fuller [mailto:fuller.art...@gmail.com]
 Sent: Sunday, September 23, 2012 3:39 PM
 To: Tim Pownall
 Cc: mysql@lists.mysql.com
 Subject: Re: How to block SELECT * FROM table; but not SELECT * FROMT
 table WHERE...;
 
 Tim,
 
 I think you misunderstood the question. Daniel wants to block Select
 queries that ask for all rwows, and permit only queries that ask for
 some rows, as restricted by the Where clause.
 
 Unfortunately, I don't think that can be done. But I'm not certain of
 that; there might be a trick.
 
 Arthur
 www.artfulsoftware.com
 
 On Sun, Sep 23, 2012 at 3:50 PM, Tim Pownall pownall...@gmail.com
 wrote:
 
   select * from table where column=value means it will return only
 rows
  that match.  as long as you have proper indexing there should not be
 any issues.
 
  On Sun, Sep 23, 2012 at 1:23 PM, Luis Daniel Lucio Quiroz 
  luis.daniel.lu...@gmail.com wrote:
 
 

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



RE: [ask] count items in the SET(value1,value2,value3)

2012-09-24 Thread Rick James
SET foo (...)
Maybe:
SELECT BIT_COUNT(foo) ...


 -Original Message-
 From: Morning Star [mailto:morning.star.c...@gmail.com]
 Sent: Monday, September 24, 2012 7:02 AM
 To: mysql@lists.mysql.com
 Subject: [ask] count items in the SET(value1,value2,value3)
 
 Hi guys,
 i created a table, one of column named categories contain SET as its
 data type. let's say there are N-value in that column.
 i inserted a row to that column which contain only 5 values.
 INSERT INTO table SET categories ='value1, value2, value3, value4,
 value5' ; the question is: how can i count that items ( value1 till
 value5) ?
 
 Greetings,
 
 Marco
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql


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



user not able to login from localhost

2012-09-24 Thread Rajeev Prasad
i have given select/insert/update/delete rights to a user on a specific 
database, from localhost. when i try to login to mysql using the uid, i get 
error:



ERROR 1045 (28000): Access denied for user 'myuser'@'localhost' (using 
password: YES)


what other privilege do i need to give this user?


Re: Doubt Regd. Circular Replication In Mysql

2012-09-24 Thread Shawn Green

Hello Benjamin,

On 9/24/2012 10:52 AM, Stillman, Benjamin wrote:

replicate-same-server-id = 0 keeps MySQL from replicating binary log entries 
from itself. For instance, here's a rough overview:

You write to Server A.
Server A writes that to its binary log.
Server B reads Server A's binary log and completes the same thing.
Because log-slave-updates is enabled, Server B writes it to its own binary log.
Server C reads Server B's binary log and completes the same thing.
Again, with log-slave-updates enabled, Server C writes it to its own binary log.
Server A reads Server C's binary log.

Here's where the issue starts. Without replicate-same-server-id = 0, Server A 
will complete the insert/update/delete as it reads it from Server C's binary 
log. However, this query originated from Server A, so it's just going to do it 
again. Then it's again replicated to Server B, Server C, and so on. This can 
create a loop and/or break replication. For instance, if you drop a table on A. 
It replicates across, and back to A. Replication will error out because when it 
tries to drop the same table again, it already doesn't exist. You need 
replicate-same-server-id = 0 set so that it knows not to execute any binary log 
entries with its own server ID.



Not true.

Replication, by default, operates with --replicate-same-server-id=0. The 
only time you need to change it to a 1 is for certain recovery 
scenarios. We added this variable specifically to allow for exceptions 
to the rule that every server in a replication chain (or ring) must have 
their own, unique, --server-id value.


It's not required for normal operations. In fact we recommend you do not 
set it at all. Each server will automatically ignore any event that 
originates from a server with the same --server-id setting unless you 
specifically set --replicate-same-server-id=1 .


Regards
--
Shawn Green
MySQL Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN



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



Re: Doubt Regd. Circular Replication In Mysql

2012-09-24 Thread Stillman, Benjamin
I stand corrected and apologize. Numerous multi-master setup descriptions I've 
read have said to set this (including the one linked in the original question). 
However, as you said, the entry in the manual clearly says it defaults to 0. 
Learn something new every day. Thanks Shawn.



On Sep 24, 2012, at 2:05 PM, Shawn Green shawn.l.gr...@oracle.com wrote:

 replicate-same-server-id = 0



Notice: This communication may contain privileged and/or confidential 
information. If you are not the intended recipient, please notify the sender by 
email, and immediately delete the message and any attachments without copying 
or disclosing them. LBI may, for any reason, intercept, access, use, and 
disclose any information that is communicated by or through, or which is stored 
on, its networks, applications, services, and devices.

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



RE: user not able to login from localhost

2012-09-24 Thread Rick James
That says that your password in not correct.  You have not gotten to specific 
privileges.

Did you previously do
GRANT ... TO myuser@localhost IDENTFIED BY '...';
?

If you can get in via root, do
SHOW GRANTS FOR myuser@localhost;
SELECT * FROM mysql.user WHERE user = 'myuser';

 -Original Message-
 From: Rajeev Prasad [mailto:rp.ne...@yahoo.com]
 Sent: Monday, September 24, 2012 10:56 AM
 To: mysql list
 Subject: user not able to login from localhost
 
 i have given select/insert/update/delete rights to a user on a specific
 database, from localhost. when i try to login to mysql using the uid, i
 get error:
 
 
 
 ERROR 1045 (28000): Access denied for user 'myuser'@'localhost' (using
 password: YES)
 
 
 what other privilege do i need to give this user?

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



Re: user not able to login from localhost

2012-09-24 Thread Michael Dykman
On Mon, Sep 24, 2012 at 1:55 PM, Rajeev Prasad rp.ne...@yahoo.com wrote:
 i have given select/insert/update/delete rights to a user on a specific 
 database, from localhost. when i try to login to mysql using the uid, i get 
 error:



 ERROR 1045 (28000): Access denied for user 'myuser'@'localhost' (using 
 password: YES)


 what other privilege do i need to give this user?

The permission set you describe should be complete, so look more
closely at what was actually granted and how you are trying to log in.

The obvious questions:

How did you create and grant privileges to that user? Did you use:

grant select,insert,update,delete on mydb.* to mysql@localhost
identified by password('password');

or what variant exactly?

When you are trying to log in, are you doing that explicitly from the
same server or are you accessing remotely?

-- 
 - michael dykman
 - mdyk...@gmail.com

 May the Source be with you.

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



RE: Doubt Regd. Circular Replication In Mysql

2012-09-24 Thread Rick James
Don't use circular replication with more than 2 servers.  If one of your 3 
crashes and cannot be recovered, you will have a nightmare on your hands to fix 
the broken replication.

 -Original Message-
 From: Stillman, Benjamin [mailto:bstill...@limitedbrands.com]
 Sent: Monday, September 24, 2012 11:56 AM
 To: Shawn Green
 Cc: mysql@lists.mysql.com
 Subject: Re: Doubt Regd. Circular Replication In Mysql
 
 I stand corrected and apologize. Numerous multi-master setup
 descriptions I've read have said to set this (including the one linked
 in the original question). However, as you said, the entry in the
 manual clearly says it defaults to 0. Learn something new every day.
 Thanks Shawn.
 
 
 
 On Sep 24, 2012, at 2:05 PM, Shawn Green shawn.l.gr...@oracle.com
 wrote:
 
  replicate-same-server-id = 0
 
 
 
 Notice: This communication may contain privileged and/or confidential
 information. If you are not the intended recipient, please notify the
 sender by email, and immediately delete the message and any attachments
 without copying or disclosing them. LBI may, for any reason, intercept,
 access, use, and disclose any information that is communicated by or
 through, or which is stored on, its networks, applications, services,
 and devices.
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql


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



Re: user not able to login from localhost

2012-09-24 Thread Ben Mildren
Also ensure you issue: FLUSH PRIVILEGES; after making any changes to
permissions..

On 24 September 2012 20:09, Rick James rja...@yahoo-inc.com wrote:
 That says that your password in not correct.  You have not gotten to specific 
 privileges.

 Did you previously do
 GRANT ... TO myuser@localhost IDENTFIED BY '...';
 ?

 If you can get in via root, do
 SHOW GRANTS FOR myuser@localhost;
 SELECT * FROM mysql.user WHERE user = 'myuser';

 -Original Message-
 From: Rajeev Prasad [mailto:rp.ne...@yahoo.com]
 Sent: Monday, September 24, 2012 10:56 AM
 To: mysql list
 Subject: user not able to login from localhost

 i have given select/insert/update/delete rights to a user on a specific
 database, from localhost. when i try to login to mysql using the uid, i
 get error:



 ERROR 1045 (28000): Access denied for user 'myuser'@'localhost' (using
 password: YES)


 what other privilege do i need to give this user?

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


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



Re: secure user name for MySQL account?

2012-09-24 Thread Arthur Fuller
On this note, one thing that really bugs me about MySQL passwords is the
inability to use special characters. In the SQL Server world, I let users
choose their own passwords, but obeying these rules:

It cannot be a dictionary word or sequence of words.
It must contain at least one numeric digit.
It must contain a mix of upper and lower case.
It must contain at least one special character.

That combination makes a password very difficult to crack. I don't know why
MySQL falls so short in this respect.

Arthur
www.artfulsoftware.com


Re: secure user name for MySQL account?

2012-09-24 Thread Shawn Green

Hello Arthur,

On 9/24/2012 4:25 PM, Arthur Fuller wrote:

On this note, one thing that really bugs me about MySQL passwords is the
inability to use special characters. In the SQL Server world, I let users
choose their own passwords, but obeying these rules:

It cannot be a dictionary word or sequence of words.
It must contain at least one numeric digit.
It must contain a mix of upper and lower case.
It must contain at least one special character.

That combination makes a password very difficult to crack. I don't know why
MySQL falls so short in this respect.



MySQL continues to improve in this respect. While it's true that our 
last big security change was the enhanced password hash function 
introduced in 4.1 we have not been completely insensitive to the needs 
of our customers.  For example, check out the list of account and 
security improvements arriving in MySQL 5.6

http://dev.mysql.com/doc/refman/5.6/en/mysql-nutshell.html

In particular, the password complexity threshold can be configured using 
the new Password Validation plugin:

http://dev.mysql.com/doc/refman/5.6/en/validate-password-plugin.html

Yours,
--
Shawn Green
MySQL Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN



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



Re: user not able to login from localhost

2012-09-24 Thread Rajeev Prasad
this is what i see:

| GRANT USAGE ON *.* TO 'myuser'@'localhost' IDENTIFIED BY PASSWORD 
'*829E20779862ACF47E2B4D9B7C6B1B1B1ADF7925' |
| GRANT SELECT, INSERT, UPDATE, DELETE, LOCK TABLES ON `mydatabase`.* TO 
'myuser'@'localhost' |
+-+


I am using phpmyadmin to manage mysql, including user privileges.




 From: Ben Mildren ben.mild...@gmail.com
To: Rajeev Prasad rp.ne...@yahoo.com 
Cc: mysql list mysql@lists.mysql.com 
Sent: Monday, September 24, 2012 2:49 PM
Subject: Re: user not able to login from localhost
 
Also ensure you issue: FLUSH PRIVILEGES; after making any changes to
permissions..

On 24 September 2012 20:09, Rick James rja...@yahoo-inc.com wrote:
 That says that your password in not correct.  You have not gotten to specific 
 privileges.

 Did you previously do
 GRANT ... TO myuser@localhost IDENTFIED BY '...';
 ?

 If you can get in via root, do
 SHOW GRANTS FOR myuser@localhost;
 SELECT * FROM mysql.user WHERE user = 'myuser';

 -Original Message-
 From: Rajeev Prasad [mailto:rp.ne...@yahoo.com]
 Sent: Monday, September 24, 2012 10:56 AM
 To: mysql list
 Subject: user not able to login from localhost

 i have given select/insert/update/delete rights to a user on a specific
 database, from localhost. when i try to login to mysql using the uid, i
 get error:



 ERROR 1045 (28000): Access denied for user 'myuser'@'localhost' (using
 password: YES)


 what other privilege do i need to give this user?

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


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

Re: user not able to login from localhost

2012-09-24 Thread Rajeev Prasad
mysql SELECT * FROM mysql.user WHERE user ='myuser';
+---+--+---+-+-+-+-+-+---+-+---+--+---++-+++--++---+--+--+-+--+--++-++--++--+--++-+--+---+-+-+--+
| Host  | User | Password  | 
Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv 
| Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | 
References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | 
Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | 
Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | 
Alter_routine_priv | Create_user_priv | Event_priv | Trigger_priv | ssl_type | 
ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | 
max_connections | max_user_connections |
+---+--+---+-+-+-+-+-+---+-+---+--+---++-+++--++---+--+--+-+--+--++-++--++--+--++-+--+---+-+-+--+
| localhost | myuser| *829E20779862ACF47E2B4D9B7C6B1B1B1ADF7925 | N   | 
N   | N   | N   | N   | N | N   
| N | N    | N | N  | N   | 
N  | N  | N    | N  | N | 
N    | N    | N   | N    | 
N    | N  | N   | N  | 
N    | N  | N    |  |    
| |  | 0
 |   0 |   0 |    0 |
+---+--+---+-+-+-+-+-+---+-+---+--+---++-+++--++---+--+--+-+--+--++-++--++--+--++-+--+---+-+-+--+
1 row in set (0.02 sec)

mysql 



I am looging in from the same server.





 From: Rick James rja...@yahoo-inc.com
To: Rajeev Prasad rp.ne...@yahoo.com; mysql list mysql@lists.mysql.com 
Sent: Monday, September 24, 2012 2:09 PM
Subject: RE: user not able to login from localhost
 
That says that your password in not correct.  You have not gotten to specific 
privileges.

Did you previously do
GRANT ... TO myuser@localhost IDENTFIED BY '...';
?

If you can get in via root, do
SHOW GRANTS FOR myuser@localhost;
SELECT * FROM mysql.user WHERE user = 'myuser';

 -Original Message-
 From: Rajeev Prasad [mailto:rp.ne...@yahoo.com]
 Sent: Monday, September 24, 2012 10:56 AM
 To: mysql list
 Subject: user not able to login from localhost
 
 i have given select/insert/update/delete rights to a user on a specific
 database, from localhost. when i try to login to mysql using the uid, i
 get error:
 
 
 
 ERROR 1045 (28000): Access denied for user 'myuser'@'localhost' (using
 password: YES)
 
 
 what other privilege do i need to give this user?

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

(resolved) Re: user not able to login from localhost

2012-09-24 Thread Rajeev Prasad
friends,  i figure that i had to give password in quotes. i was then able to 
login. thank you all for your help and time.




 From: Rajeev Prasad rp.ne...@yahoo.com
To: Rick James rja...@yahoo-inc.com; mysql list mysql@lists.mysql.com 
Sent: Monday, September 24, 2012 4:11 PM
Subject: Re: user not able to login from localhost
 
mysql SELECT * FROM mysql.user WHERE user ='myuser';
+---+--+---+-+-+-+-+-+---+-+---+--+---++-+++--++---+--+--+-+--+--++-++--++--+--++-+--+---+-+-+--+
| Host  | User | Password  | 
Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv 
| Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | 
References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | 
Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | 
Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | 
Alter_routine_priv | Create_user_priv | Event_priv | Trigger_priv | ssl_type | 
ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | 
max_connections | max_user_connections |
+---+--+---+-+-+-+-+-+---+-+---+--+---++-+++--++---+--+--+-+--+--++-++--++--+--++-+--+---+-+-+--+
| localhost | myuser| *829E20779862ACF47E2B4D9B7C6B1B1B1ADF7925 | N   | 
N   | N   | N   | N   | N | N   
| N | N    | N | N  | N   | 
N  | N  | N    | N  | N | 
N    | N    | N   | N    | 
N    | N  | N   | N  | 
N    | N  | N    |  |    
| |  | 0
|   0 |   0 |    0 |
+---+--+---+-+-+-+-+-+---+-+---+--+---++-+++--++---+--+--+-+--+--++-++--++--+--++-+--+---+-+-+--+
1 row in set (0.02 sec)

mysql 



I am looging in from the same server.





From: Rick James rja...@yahoo-inc.com
To: Rajeev Prasad rp.ne...@yahoo.com; mysql list mysql@lists.mysql.com 
Sent: Monday, September 24, 2012 2:09 PM
Subject: RE: user not able to login from localhost

That says that your password in not correct.  You have not gotten to specific 
privileges.

Did you previously do
GRANT ... TO myuser@localhost IDENTFIED BY '...';
?

If you can get in via root, do
SHOW GRANTS FOR myuser@localhost;
SELECT * FROM mysql.user WHERE user = 'myuser';

 -Original Message-
 From: Rajeev Prasad [mailto:rp.ne...@yahoo.com]
 Sent: Monday, September 24, 2012 10:56 AM
 To: mysql list
 Subject: user not able to login from localhost
 
 i have given select/insert/update/delete rights to a user on a specific
 database, from localhost. when i try to login to mysql using the uid, i
 get error:
 
 
 
 ERROR 1045 (28000): Access denied for user 'myuser'@'localhost' (using
 password: YES)
 
 
 what other privilege do i need to give this user?

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

Re: secure user name for MySQL account?

2012-09-24 Thread Arthur Fuller
Thanks for the update, Shawn. I'll check it out right now.

On Mon, Sep 24, 2012 at 4:40 PM, Shawn Green shawn.l.gr...@oracle.comwrote:

 Hello Arthur,


 On 9/24/2012 4:25 PM, Arthur Fuller wrote:

 On this note, one thing that really bugs me about MySQL passwords is the
 inability to use special characters. In the SQL Server world, I let users
 choose their own passwords, but obeying these rules:

 It cannot be a dictionary word or sequence of words.
 It must contain at least one numeric digit.
 It must contain a mix of upper and lower case.
 It must contain at least one special character.

 That combination makes a password very difficult to crack. I don't know
 why
 MySQL falls so short in this respect.


 MySQL continues to improve in this respect. While it's true that our last
 big security change was the enhanced password hash function introduced in
 4.1 we have not been completely insensitive to the needs of our customers.
  For example, check out the list of account and security improvements
 arriving in MySQL 5.6
 http://dev.mysql.com/doc/**refman/5.6/en/mysql-nutshell.**htmlhttp://dev.mysql.com/doc/refman/5.6/en/mysql-nutshell.html

 In particular, the password complexity threshold can be configured using
 the new Password Validation plugin:
 http://dev.mysql.com/doc/**refman/5.6/en/validate-**password-plugin.htmlhttp://dev.mysql.com/doc/refman/5.6/en/validate-password-plugin.html

 Yours,
 --
 Shawn Green



Need Help Converting Character Sets

2012-09-24 Thread Mark Phillips
I have a table, Articles, of news articles (in English) with three text
columns for the intro, body, and caption. The data came from a web page,
and the content was cut and pasted from other sources. I am finding that
there are some non utf-8 characters in these three text columns. I would
like to (1) convert these text fields to be strict utf-8 and then (2) fix
the input page to keep all new submissions utf-8.

91) For the first step, fixing the current database, I tried:

update Articles set body = CONVERT(body USING ASCII);

However, when I checked one of the articles I found an apostrophe had been
converted into a question mark. (FWIW, the apostrophe was one of those
offending non utf-8 characters):

Before conversion: I stepped into the observatory’s control room ...

After conversion: I stepped into the observatory?s control room...

Is there a better way to accomplish my first goal, without reading each
article and manually making the changes?

(2) For the second goal, insuring that all future articles are utf-8, do I
need to change the table structure or the insert query to insure I get the
correct utf-8 characters into the database?

Thanks,

Mark


RE: Need Help Converting Character Sets

2012-09-24 Thread Rick James
If you have a mixture of encodings, you are in deep doodoo.

This page describes some debugging techniques and some issues:
   http://mysql.rjweb.org/doc.php/charcoll

That apostrophe might be MicroSquish's smart quote.

Can you provide SELECT HEX(the_field) FROM... ?  We (or the above page) might 
be able to interpret the character.

To prevent future char set issues, you must know what encoding the source is.  
Then, with SET NAMES (etc), you tell mysqld that the bytes you have in hand are 
encoded that way.  mysqld will then convert those bytes to the character set of 
declared for the column they go in.  (Presumably, all the text columns will be 
declared utf8 or utf8mb4.)

 -Original Message-
 From: Mark Phillips [mailto:m...@phillipsmarketing.biz]
 Sent: Monday, September 24, 2012 4:28 PM
 To: Mysql List
 Subject: Need Help Converting Character Sets
 
 I have a table, Articles, of news articles (in English) with three text
 columns for the intro, body, and caption. The data came from a web
 page, and the content was cut and pasted from other sources. I am
 finding that there are some non utf-8 characters in these three text
 columns. I would like to (1) convert these text fields to be strict
 utf-8 and then (2) fix the input page to keep all new submissions utf-
 8.
 
 91) For the first step, fixing the current database, I tried:
 
 update Articles set body = CONVERT(body USING ASCII);
 
 However, when I checked one of the articles I found an apostrophe had
 been converted into a question mark. (FWIW, the apostrophe was one of
 those offending non utf-8 characters):
 
 Before conversion: I stepped into the observatory's control room ...
 
 After conversion: I stepped into the observatory?s control room...
 
 Is there a better way to accomplish my first goal, without reading each
 article and manually making the changes?
 
 (2) For the second goal, insuring that all future articles are utf-8,
 do I need to change the table structure or the insert query to insure I
 get the correct utf-8 characters into the database?
 
 Thanks,
 
 Mark

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



Re: Doubt Regd. Circular Replication In Mysql

2012-09-24 Thread Adarsh Sharma
Agreed with your point Rick, right now i am maintaining my datadir 
logging in my EBS volumes so if any of the instance goes down ,we will
launch new instance  use the existing EBS volumes and start replication
again.

I think it will start automatically from the point where it goes down and
start replicating again.

Can we use any other prevention for automating the failover.

Thanks

On Tue, Sep 25, 2012 at 12:41 AM, Rick James rja...@yahoo-inc.com wrote:

 Don't use circular replication with more than 2 servers.  If one of your 3
 crashes and cannot be recovered, you will have a nightmare on your hands to
 fix the broken replication.

  -Original Message-
  From: Stillman, Benjamin [mailto:bstill...@limitedbrands.com]
  Sent: Monday, September 24, 2012 11:56 AM
  To: Shawn Green
  Cc: mysql@lists.mysql.com
  Subject: Re: Doubt Regd. Circular Replication In Mysql
 
  I stand corrected and apologize. Numerous multi-master setup
  descriptions I've read have said to set this (including the one linked
  in the original question). However, as you said, the entry in the
  manual clearly says it defaults to 0. Learn something new every day.
  Thanks Shawn.
 
 
 
  On Sep 24, 2012, at 2:05 PM, Shawn Green shawn.l.gr...@oracle.com
  wrote:
 
   replicate-same-server-id = 0
 
  
 
  Notice: This communication may contain privileged and/or confidential
  information. If you are not the intended recipient, please notify the
  sender by email, and immediately delete the message and any attachments
  without copying or disclosing them. LBI may, for any reason, intercept,
  access, use, and disclose any information that is communicated by or
  through, or which is stored on, its networks, applications, services,
  and devices.
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/mysql


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