RE: How to block SELECT * FROM table; but not SELECT * FROMT table WHERE...;
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 a 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 > 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: Mysql cluster installation error
CONTACT the server admin and request access to the MySQL Instance located there Martin __ Verzicht und Vertraulichkeitanmerkung 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. > Date: Sun, 23 Sep 2012 12:40:17 -0500 > Subject: Re: Mysql cluster installation error > From: aast...@gmail.com > To: mdyk...@gmail.com > CC: mysql@lists.mysql.com > > Thanks! > And how do i connect the cluster from the remote host. > When i try to connect one of the SQL node through remote host it says > access denied. > WHile the same is working fine from local host. > Kindly help. > Thanks! > > On Sun, Sep 23, 2012 at 12:35 PM, Michael Dykman wrote: > > > If all you need to transfer is schema, do it the same way you would any > > other table type: use mysqldump with the - - no-data option. > > > > On 2012-09-23 1:29 PM, "Aastha" wrote: > > > > Thanks Nitin. > > I specied the location of my.ini while starting the SQL node and it worked > > fine. > > > > I have anothe rquestion : > > How to connect the cluster and reomte host. And i have to copy a schema > > from one Mysql clsuter to another. How do i do that. > > > > Regards, > > > > > > On Sun, Sep 23, 2012 at 3:13 AM, Nitin Mehta wrote: > > > > > Hi Aastha, > > > > > > I'm not 10... > >
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 a 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 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: > > > >
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 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: > >
Re: How to block SELECT * FROM table; but not SELECT * FROMT table WHERE...;
that does not change the fact that it is valid to NOT have a where statement and for me it sound plain stupid to think about blocking queries without where-statements - the application developers will hopefully kill any admin who finds a solution for this... * i maintain a cms-system since 10 years * mainmenu: select id,title from table order by sortfield; * and YES in the backend the is no single reson to reduce the result * and NO using a key would not make anything faster so why would there be a WHERE make any sense and why does someone like to break the application just for fun? Am 23.09.2012 21:50, schrieb Tim Pownall: > 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: > >> Helo, >> >> Just wondering if is possible to block SELECT queries that doesnt have >> a WHERE statement within. signature.asc Description: OpenPGP digital signature
Re: How to block SELECT * FROM table; but not SELECT * FROMT table WHERE...;
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: > Helo, > > Just wondering if is possible to block SELECT queries that doesnt have > a WHERE statement within. > > > LD > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/mysql > > -- Thanks, Tim Pownall GNU/Linux Systems Monitoring 610-621-9712 pownall...@gmail.com
Re: How to block SELECT * FROM table; but not SELECT * FROMT table WHERE...;
Am 23.09.2012 20:23, schrieb Luis Daniel Lucio Quiroz: > Just wondering if is possible to block SELECT queries that doesnt have > a WHERE statement within. no and the idea is broken by design what is wrong with a "select * from table" with small tbales having only a handful of records? how will you work with broken "select count(*) from table;"? signature.asc Description: OpenPGP digital signature
How to block SELECT * FROM table; but not SELECT * FROMT table WHERE...;
Helo, Just wondering if is possible to block SELECT queries that doesnt have a WHERE statement within. LD -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: Mysql cluster installation error
If your remote host is not configured as a sql node to your cluster, you don't need to just to import the schema. Run mysqldump on any client machine specifying any of your configured sql nodes via -host=. On 2012-09-23 1:40 PM, "Aastha" wrote: Thanks! And how do i connect the cluster from the remote host. When i try to connect one of the SQL node through remote host it says access denied. WHile the same is working fine from local host. Kindly help. Thanks! On Sun, Sep 23, 2012 at 12:35 PM, Michael Dykman wrote: > > If all you need to ...
Re: Mysql cluster installation error
Thanks! And how do i connect the cluster from the remote host. When i try to connect one of the SQL node through remote host it says access denied. WHile the same is working fine from local host. Kindly help. Thanks! On Sun, Sep 23, 2012 at 12:35 PM, Michael Dykman wrote: > If all you need to transfer is schema, do it the same way you would any > other table type: use mysqldump with the - - no-data option. > > On 2012-09-23 1:29 PM, "Aastha" wrote: > > Thanks Nitin. > I specied the location of my.ini while starting the SQL node and it worked > fine. > > I have anothe rquestion : > How to connect the cluster and reomte host. And i have to copy a schema > from one Mysql clsuter to another. How do i do that. > > Regards, > > > On Sun, Sep 23, 2012 at 3:13 AM, Nitin Mehta wrote: > > > Hi Aastha, > > > > I'm not 10... >
Re: Mysql cluster installation error
If all you need to transfer is schema, do it the same way you would any other table type: use mysqldump with the - - no-data option. On 2012-09-23 1:29 PM, "Aastha" wrote: Thanks Nitin. I specied the location of my.ini while starting the SQL node and it worked fine. I have anothe rquestion : How to connect the cluster and reomte host. And i have to copy a schema from one Mysql clsuter to another. How do i do that. Regards, On Sun, Sep 23, 2012 at 3:13 AM, Nitin Mehta wrote: > Hi Aastha, > > I'm not 10...
Re: Mysql cluster installation error
Thanks Nitin. I specied the location of my.ini while starting the SQL node and it worked fine. I have anothe rquestion : How to connect the cluster and reomte host. And i have to copy a schema from one Mysql clsuter to another. How do i do that. Regards, On Sun, Sep 23, 2012 at 3:13 AM, Nitin Mehta wrote: > Hi Aastha, > > I'm not 100% sure but you could try defining the full connectstring using: > > ndb-connectstring = localhost:1186 > > See if that helps. > > Regards, > > > > From: Aastha > To: mysql@lists.mysql.com > Sent: Sunday, September 23, 2012 7:51 AM > Subject: Mysql cluster installation error > > Hello, > > I am trying to install MySQL cluster on three physical machines. > Management Node on one machine. > Data Node on two machines. > SQL node on the same machine as Management Node. > > Management node started > Data Nodes started > *SQL node started but not connected to Management NOde and it gives no > error * > > C:\mysql\bin>ndb_mgm -e show > Connected to Management Server at: localhost:1186 > Cluster Configuration > - > [ndbd(NDB)] 2 node(s) > id=8@172.16.56.8 (mysql-5.5.25 ndb-7.2.7, Nodegroup: 0, Master) > id=9@172.16.56.9 (mysql-5.5.25 ndb-7.2.7, Nodegroup: 0) > > [ndb_mgmd(MGM)] 1 node(s) > id=6@172.16.56.7 (mysql-5.5.25 ndb-7.2.7) > > [mysqld(API)] 1 node(s) > id=7 (not connected, accepting connect from 172.16.56.7) > > > *config.ini* > > [ndbd default] > # Options affecting ndbd processes on all data nodes: > NoOfReplicas=2# Number of replicas > DataDir=C:/mysql/bin/cluster-data # Directory for each data node's data > files > DataMemory=80M# Memory allocated to data storage > IndexMemory=18M # Memory allocated to index storage > > [ndb_mgmd] > # Management process options: > HostName=172.16.56.7# Hostname or IP address of management > node > DataDir=C:/mysql/bin/cluster-logs # Directory for management node log > files > NodeId=5 > > [ndbd] > # Options for data node "A": > HostName=172.16.56.8 # Hostname or IP address > NodeId=8 > MaxNoOfOrderedIndexes=1024 > MaxNoOfAttributes=3000 # added 2012.8.08 > > [ndbd] > # Options for data node "B": > HostName=172.16.56.9 # Hostname or IP address > NodeId=9 > MaxNoOfOrderedIndexes=1024 > MaxNoOfAttributes=3000 # added 2012.8.08 > > > > [mysqld] > # SQL node options: > HostName=172.16.56.7 # Hostname or IP address > NodeId=7 > > *my.ini* > * > * > [mysql_cluster] > # Options for management node process > config-file=c:/mysql/bin/config.ini > configdir=c:/mysql/bin/cluster-cache/ > > > [mysqld] > # Options for mysqld process: > ndbcluster # run NDB storage engine > ndb-connectstring=172.16.56.7 # location of management server > ndb-nodeid=7 > server-id=7 > default-storage-engine=ndbcluster > > > Could anyone help to identify/ > > > Aastha Gupta >
Re: Mysql cluster installation error
Hi Aastha, I'm not 100% sure but you could try defining the full connectstring using: ndb-connectstring = localhost:1186 See if that helps. Regards, From: Aastha To: mysql@lists.mysql.com Sent: Sunday, September 23, 2012 7:51 AM Subject: Mysql cluster installation error Hello, I am trying to install MySQL cluster on three physical machines. Management Node on one machine. Data Node on two machines. SQL node on the same machine as Management Node. Management node started Data Nodes started *SQL node started but not connected to Management NOde and it gives no error * C:\mysql\bin>ndb_mgm -e show Connected to Management Server at: localhost:1186 Cluster Configuration - [ndbd(NDB)] 2 node(s) id=8 @172.16.56.8 (mysql-5.5.25 ndb-7.2.7, Nodegroup: 0, Master) id=9 @172.16.56.9 (mysql-5.5.25 ndb-7.2.7, Nodegroup: 0) [ndb_mgmd(MGM)] 1 node(s) id=6 @172.16.56.7 (mysql-5.5.25 ndb-7.2.7) [mysqld(API)] 1 node(s) id=7 (not connected, accepting connect from 172.16.56.7) *config.ini* [ndbd default] # Options affecting ndbd processes on all data nodes: NoOfReplicas=2 # Number of replicas DataDir=C:/mysql/bin/cluster-data # Directory for each data node's data files DataMemory=80M # Memory allocated to data storage IndexMemory=18M # Memory allocated to index storage [ndb_mgmd] # Management process options: HostName=172.16.56.7 # Hostname or IP address of management node DataDir=C:/mysql/bin/cluster-logs # Directory for management node log files NodeId=5 [ndbd] # Options for data node "A": HostName=172.16.56.8 # Hostname or IP address NodeId=8 MaxNoOfOrderedIndexes=1024 MaxNoOfAttributes=3000 # added 2012.8.08 [ndbd] # Options for data node "B": HostName=172.16.56.9 # Hostname or IP address NodeId=9 MaxNoOfOrderedIndexes=1024 MaxNoOfAttributes=3000 # added 2012.8.08 [mysqld] # SQL node options: HostName=172.16.56.7 # Hostname or IP address NodeId=7 *my.ini* * * [mysql_cluster] # Options for management node process config-file=c:/mysql/bin/config.ini configdir=c:/mysql/bin/cluster-cache/ [mysqld] # Options for mysqld process: ndbcluster # run NDB storage engine ndb-connectstring=172.16.56.7 # location of management server ndb-nodeid=7 server-id=7 default-storage-engine=ndbcluster Could anyone help to identify/ Aastha Gupta