C compared to C++/Java; Was: Re: InnoDB Hot Backup + MySQL embedded?
Jochem, - Original Message - From: Jochem van Dieten [EMAIL PROTECTED] Newsgroups: mailing.database.myodbc Sent: Saturday, February 21, 2004 2:10 AM Subject: Re: InnoDB Hot Backup + MySQL embedded? Sasha Pachev wrote: Heikki Tuuri wrote: C versus object-oriented lanuguages like C++/Java is a topic I have discussed a lot with programmers. I believe that traditional procedural approaches and languages, like C, are the best for 'systems programming', by which I mean implementing anything with complex data structures and lots of parallelism. A DBMS is a typical example of such a complex program. 3) A weakness of C compared to Java is memory management. In C you can easily write programs that leak memory or run over allocated buffers. In practice, it has turned out to be relatively easy to keep these memory management bugs at a tolerable level in our C programs, so that a move to a language with automatic memory management is not needed. In Java is it easy to write a program that wastes large amounts of memory, which is worse than a leak. In C, you are full from the start, and then you leak a drop at a time until you are empty. In Java , you are empty from the start, and you have nothing to leak anyway even if you could :-) http://citeseer.nj.nec.com/shah01java.html here is a .pdf version of the paper: http://gist.cs.berkeley.edu/~mashah/java-paper/paper.pdf The authors used a 2 x Pentium III 667 MHz, Linux-2.2.16, Sun JDK 1.3, and Java HotSpot Server JVM 1.3.0. to implement a 'data-flow' query processor. Their conclusion is that the memory management and the garbage collection of Java is inefficient. The graph that they present shows an up to 2.5-fold performance degradation with the Java garbage collector, compared to their own tailored memory management system. I worked with Entity Systems Oy in the 1980s. We developed a Lisp interpreter and a compiler, and a Prolog interpreter. At that time, the inefficiency of the garbage collection in Lisp and Prolog was a serious problem. I am not familiar with more modern garbage collection algorithms, but the paper of Shah et al. suggests that there are still problems today. In the 1980s, the research group of Mike Stonebraker initially started implementing Postgres in a mixture of Lisp and C, but they later abandoned Lisp. Jochem Regards, Heikki -- I don't get it immigrants don't work and steal our jobs - Loesje -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
AW: C compared to C++/Java; Was: Re: InnoDB Hot Backup + MySQL em bedded?
Hi, this discussion is useless, object or procedure is not realy the question. You need to know how to build a good programm, if you cannot create a good programm, no matter what language. The amount of realy bad java-programs (90% i have seen were realy bad) shows, that it is maybe not a good idea, to make programming to easy :o) . There are a lot of people, thinkink a complex task is better done with an oo-language. My boss is this opinion and had already 2 memleaks in C++, he searched for one 6 weeks. So the truth seems to be, that an oo-language (especially java) makes it easy to programm complex tasks, but what comes out in the end is worth. I prefer TCL because on my opinion it is the best of both worlds ( i never had a memleak except with a bad API written in C). Complex tasks should be done from skilled programmers - thats all. mfg Klaus -Ursprngliche Nachricht- Von: Heikki Tuuri [mailto:[EMAIL PROTECTED] Gesendet: Samstag, 21. Februar 2004 09:30 An: [EMAIL PROTECTED] Betreff: C compared to C++/Java; Was: Re: InnoDB Hot Backup + MySQL embedded? Jochem, - Original Message - From: Jochem van Dieten [EMAIL PROTECTED] Newsgroups: mailing.database.myodbc Sent: Saturday, February 21, 2004 2:10 AM Subject: Re: InnoDB Hot Backup + MySQL embedded? Sasha Pachev wrote: Heikki Tuuri wrote: C versus object-oriented lanuguages like C++/Java is a topic I have discussed a lot with programmers. I believe that traditional procedural approaches and languages, like C, are the best for 'systems programming', by which I mean implementing anything with complex data structures and lots of parallelism. A DBMS is a typical example of such a complex program. 3) A weakness of C compared to Java is memory management. In C you can easily write programs that leak memory or run over allocated buffers. In practice, it has turned out to be relatively easy to keep these memory management bugs at a tolerable level in our C programs, so that a move to a language with automatic memory management is not needed. In Java is it easy to write a program that wastes large amounts of memory, which is worse than a leak. In C, you are full from the start, and then you leak a drop at a time until you are empty. In Java , you are empty from the start, and you have nothing to leak anyway even if you could :-) http://citeseer.nj.nec.com/shah01java.html here is a .pdf version of the paper: http://gist.cs.berkeley.edu/~mashah/java-paper/paper.pdf The authors used a 2 x Pentium III 667 MHz, Linux-2.2.16, Sun JDK 1.3, and Java HotSpot Server JVM 1.3.0. to implement a 'data-flow' query processor. Their conclusion is that the memory management and the garbage collection of Java is inefficient. The graph that they present shows an up to 2.5-fold performance degradation with the Java garbage collector, compared to their own tailored memory management system. I worked with Entity Systems Oy in the 1980s. We developed a Lisp interpreter and a compiler, and a Prolog interpreter. At that time, the inefficiency of the garbage collection in Lisp and Prolog was a serious problem. I am not familiar with more modern garbage collection algorithms, but the paper of Shah et al. suggests that there are still problems today. In the 1980s, the research group of Mike Stonebraker initially started implementing Postgres in a mixture of Lisp and C, but they later abandoned Lisp. Jochem Regards, Heikki -- I don't get it immigrants don't work and steal our jobs - Loesje -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: question
Hi, From: [EMAIL PROTECTED] Sent: Saturday, February 21, 2004 10:28 AM win32: Hello! me just download mysql of windows edition,and me have installed,on the local macheine me have successed.but me have two question : one is :if my tool is PowerBuilder ,how to connect to mysql? the other is :how to connect the network mysql server ? Ansver for one question : I am not know powerbuilder.. Ansver for other question : you write is mysql IP, Port, DataBaseName.. and connect if mysql to mysql then you use mysql client.. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Can't create a new thread (errno 11)
Hello James, thanks for your answer, but max_connections is set high enough (double the number of the currently used threads). I think the error would be Too many connections, wouldn't it? -Christof James Kelty wrote: Check the max_connections variable Mysql show variables liks '%connection%'; -James -Original Message- From: Christof Egner [mailto:[EMAIL PROTECTED] Sent: Friday, February 20, 2004 9:03 AM To: [EMAIL PROTECTED] Subject: Can't create a new thread (errno 11) Hello, I'm having problems with a 4.0.18 MySQL Server. Since this afternoon I get the error Can't create a new thread (errno 11) when MySQL has forked about 200-300 threads. What does it mean? I'm not running out of RAM or disk space. Best Regards, Christof -- ___ Configo Systems GmbH - Jahnstr. 62 - 64285 Darmstadt - DE Tel +49.6151.39656.0 Fax .49 http://www.configo.de -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: AW: C compared to C++/Java; Was: Re: InnoDB Hot Backup + MySQL em bedded?
Hello, Personally, I think it's a matter of choosing the best tool for the job. For myself and my team, Java is the work horse particularly - suited for rapid application development and when there is a strong cross platform requirement. This means that Java tends to dominate our utilities and user-interface code. When heavy lifting is required we move to C++. Java's object model is simplistic (both a strength and a weakness). C++ is extremely flexible and efficient. To a greater extent, C/C++ will let you do a lot of things you really shouldn't. Java isn't immune to this. After all, bad engineering is bad engineering. In both cases it's up to the programmer to keep things where they should be. As for seeing a lot of bad Java programs and a lot of bad C/C++ programs... In my experience I've seen about the same of both... but a bad C/C++ program is less likely to survive deployment than a bad Java program. My $0.03. _M At 04:39 AM 2/21/2004, Franz, Fa. PostDirekt MA wrote: Hi, this discussion is useless, object or procedure is not realy the question. You need to know how to build a good programm, if you cannot create a good programm, no matter what language. The amount of realy bad java-programs (90% i have seen were realy bad) shows, that it is maybe not a good idea, to make programming to easy :o) . There are a lot of people, thinkink a complex task is better done with an oo-language. My boss is this opinion and had already 2 memleaks in C++, he searched for one 6 weeks. So the truth seems to be, that an oo-language (especially java) makes it easy to programm complex tasks, but what comes out in the end is worth. I prefer TCL because on my opinion it is the best of both worlds ( i never had a memleak except with a bad API written in C). Complex tasks should be done from skilled programmers - thats all. mfg Klaus -Ursprüngliche Nachricht- Von: Heikki Tuuri [mailto:[EMAIL PROTECTED] Gesendet: Samstag, 21. Februar 2004 09:30 An: [EMAIL PROTECTED] Betreff: C compared to C++/Java; Was: Re: InnoDB Hot Backup + MySQL embedded? Jochem, - Original Message - From: Jochem van Dieten [EMAIL PROTECTED] Newsgroups: mailing.database.myodbc Sent: Saturday, February 21, 2004 2:10 AM Subject: Re: InnoDB Hot Backup + MySQL embedded? Sasha Pachev wrote: Heikki Tuuri wrote: C versus object-oriented lanuguages like C++/Java is a topic I have discussed a lot with programmers. I believe that traditional procedural approaches and languages, like C, are the best for 'systems programming', by which I mean implementing anything with complex data structures and lots of parallelism. A DBMS is a typical example of such a complex program. 3) A weakness of C compared to Java is memory management. In C you can easily write programs that leak memory or run over allocated buffers. In practice, it has turned out to be relatively easy to keep these memory management bugs at a tolerable level in our C programs, so that a move to a language with automatic memory management is not needed. In Java is it easy to write a program that wastes large amounts of memory, which is worse than a leak. In C, you are full from the start, and then you leak a drop at a time until you are empty. In Java , you are empty from the start, and you have nothing to leak anyway even if you could :-) http://citeseer.nj.nec.com/shah01java.html here is a .pdf version of the paper: http://gist.cs.berkeley.edu/~mashah/java-paper/paper.pdf The authors used a 2 x Pentium III 667 MHz, Linux-2.2.16, Sun JDK 1.3, and Java HotSpot Server JVM 1.3.0. to implement a 'data-flow' query processor. Their conclusion is that the memory management and the garbage collection of Java is inefficient. The graph that they present shows an up to 2.5-fold performance degradation with the Java garbage collector, compared to their own tailored memory management system. I worked with Entity Systems Oy in the 1980s. We developed a Lisp interpreter and a compiler, and a Prolog interpreter. At that time, the inefficiency of the garbage collection in Lisp and Prolog was a serious problem. I am not familiar with more modern garbage collection algorithms, but the paper of Shah et al. suggests that there are still problems today. In the 1980s, the research group of Mike Stonebraker initially started implementing Postgres in a mixture of Lisp and C, but they later abandoned Lisp. Jochem Regards, Heikki -- I don't get it immigrants don't work and steal our jobs - Loesje -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Binary log
George Mathew [EMAIL PROTECTED] wrote: Seems to be the binary log saves all INSERT statements, even if it is a duplicate error. Only successfully executed INSERTs are written to the binary logs. How could I restore my table using mysqlbinlog if there are duplicates in the log file. What about using -f (--force) option of mysql client? -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: C compared to C++/Java; Was: Re: InnoDB Hot Backup + MySQL embedded?
Heikki Tuuri wrote: From: Jochem van Dieten Sasha Pachev wrote: In Java is it easy to write a program that wastes large amounts of memory, which is worse than a leak. In C, you are full from the start, and then you leak a drop at a time until you are empty. In Java , you are empty from the start, and you have nothing to leak anyway even if you could :-) http://citeseer.nj.nec.com/shah01java.html Their conclusion is that the memory management and the garbage collection of Java is inefficient. The graph that they present shows an up to 2.5-fold performance degradation with the Java garbage collector, compared to their own tailored memory management system. Indeed. I think the article nicely illustrates Sasha's point regarding the efficiency of Java. But I just posted this link since since it is about a database system (of some sort) and I'm trying to stay on-topic ;-) Jochem -- I don't get it immigrants don't work and steal our jobs - Loesje -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Any way to make anyhost '%' include localhost
We have a web server where users connect to mysql in scripts, etc., via the host name localhost. We would also like for them to be able to manage their databases from their office dekstops with various utilities. If we grant rights to [EMAIL PROTECTED], they can connect from the web/mysql server itself but not from other locations as expected. However, if we grant rights to username@'%', they can connect from any host other than the web server. To allow connections from any host (including the web/mysql server, localhost) we have to try and keep two sets of permissions synchonized for each user, [EMAIL PROTECTED] and [EMAIL PROTECTED], effectively doubling the number of users we have to manage. Is there any way to allow connections from both the localhost and any other host with one set of permissions per user? Thanks, Jason Joines === -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Problem trying to start mysqld_safe
Hi: I just installed MySql 4.0.18 on a Mac OS/X Powerbook computer running Panther (Mac OS 10.3). When I try to start the mysqld_safe daemon, I get the following error: {/usr/local/mysql/docs}% sudo mysqld_safe Password: Starting mysqld daemon with databases from /usr/local/mysql/data 040221 00:35:27 mysqld ended Any idea of what can be wrong. Thanks a lot in advance for your help. Regards, Enrique -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: AW: C compared to C++/Java; Was: Re: InnoDB Hot Backup + MySQL em bedded?
On Sat, 2004-02-21 at 20:39, Franz, Fa. PostDirekt MA wrote: Hi, this discussion is useless, object or procedure is not realy the question. You need to know how to build a good programm, if you cannot create a good programm, no matter what language. Originally, I was asking Heikki's opinion regarding good guidelines for C coding, as although the university I attend teaches us C from first year onwards, all testing and design subjects focus almost soley on OO-related methods. The amount of realy bad java-programs (90% i have seen were realy bad) shows, that it is maybe not a good idea, to make programming to easy :o) . Agreed! I know one person that changed my GUI architecture design from using static members to store most graphical elements to normal members because it won't cause as many problems. Memory issues are now of great concern in that system due to the shear number of Swing objects created. There are a lot of people, thinkink a complex task is better done with an oo-language. My boss is this opinion and had already 2 memleaks in C++, he searched for one 6 weeks. C++ is a terrible language for memory leaks. A common source of memory leaks comes from operator overloading, and many of us have experienced the pain involved in coming up with a solution that doesn't result in lots of wasted space on the heap. So the truth seems to be, that an oo-language (especially java) makes it easy to programm complex tasks, but what comes out in the end is worth. I've found C to be much easier for some tasks. Just picking an appropriate abstraction to use for certain architectural elements can be difficult in itself. On the other hand, I find functional languages such as Haskell and Erlang to be extremely useful for some tasks, and logical languages like Prolog (yes, I know it's not *really* a logical programming language, but it's close) and Mercury (first prize to anyone who can guess which uni I'm at!). I prefer TCL because on my opinion it is the best of both worlds ( i never had a memleak except with a bad API written in C). Bad...written in C...was it a SCO library? Complex tasks should be done from skilled programmers - thats all. Additionally, complex tasks should be decomposed into simple tasks by skilled programmers. :-) mfg Klaus -Ursprüngliche Nachricht- Von: Heikki Tuuri [mailto:[EMAIL PROTECTED] Gesendet: Samstag, 21. Februar 2004 09:30 An: [EMAIL PROTECTED] Betreff: C compared to C++/Java; Was: Re: InnoDB Hot Backup + MySQL embedded? Jochem, - Original Message - From: Jochem van Dieten [EMAIL PROTECTED] Newsgroups: mailing.database.myodbc Sent: Saturday, February 21, 2004 2:10 AM Subject: Re: InnoDB Hot Backup + MySQL embedded? Sasha Pachev wrote: Heikki Tuuri wrote: C versus object-oriented lanuguages like C++/Java is a topic I have discussed a lot with programmers. I believe that traditional procedural approaches and languages, like C, are the best for 'systems programming', by which I mean implementing anything with complex data structures and lots of parallelism. A DBMS is a typical example of such a complex program. 3) A weakness of C compared to Java is memory management. In C you can easily write programs that leak memory or run over allocated buffers. In practice, it has turned out to be relatively easy to keep these memory management bugs at a tolerable level in our C programs, so that a move to a language with automatic memory management is not needed. In Java is it easy to write a program that wastes large amounts of memory, which is worse than a leak. In C, you are full from the start, and then you leak a drop at a time until you are empty. In Java , you are empty from the start, and you have nothing to leak anyway even if you could :-) http://citeseer.nj.nec.com/shah01java.html here is a .pdf version of the paper: http://gist.cs.berkeley.edu/~mashah/java-paper/paper.pdf The authors used a 2 x Pentium III 667 MHz, Linux-2.2.16, Sun JDK 1.3, and Java HotSpot Server JVM 1.3.0. to implement a 'data-flow' query processor. Their conclusion is that the memory management and the garbage collection of Java is inefficient. The graph that they present shows an up to 2.5-fold performance degradation with the Java garbage collector, compared to their own tailored memory management system. I worked with Entity Systems Oy in the 1980s. We developed a Lisp interpreter and a compiler, and a Prolog interpreter. At that time, the inefficiency of the garbage collection in Lisp and Prolog was a serious problem. I am not familiar with more modern garbage collection algorithms, but the paper of Shah et al. suggests that there are still problems today. In the 1980s, the research group of Mike Stonebraker initially started implementing Postgres in a mixture of Lisp and C, but they later abandoned Lisp. Jochem Regards, Heikki -- I
Re: Improving seek/access times -- does RAID help?
Can anyone tell me whether or not some kind of RAID will improve the seek/access times during lots of random reads from, say, MyISAM data files? I *do not care* about improved [sequential] transfer rates; I want the fastest possible random access. RAID will only help reduce the average random access time not an individual random access. This would require you to have a large number of accesses/sec, with multiple accesses in progress at the same time. If you are dealing with a single-threaded type situation I doubt that RAID will help the situation much. The read-ahead most disks provide may prove useful depending on how much of the data actually gets scanned. But large requests are where this excells, typical of a table scan should it occur. For random small reads, like an index access, you would need many of them in progress simultaneously to get real benefit from RAID. Brad Eacker ([EMAIL PROTECTED]) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Problem trying to start mysqld_safe
Enrique Ibarra [EMAIL PROTECTED] wrote: Hi: I just installed MySql 4.0.18 on a Mac OS/X Powerbook computer running Panther (Mac OS 10.3). When I try to start the mysqld_safe daemon, I get the following error: {/usr/local/mysql/docs}% sudo mysqld_safe Password: Starting mysqld daemon with databases from /usr/local/mysql/data 040221 00:35:27 mysqld ended Any idea of what can be wrong. Thanks a lot in advance for your help. Look into error log file (host_name.err in the MySQL data dir) to see the causes of failed start. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
GRANT question
I am new to most aspects of MySQL administration so I was wondering if someone can help me figure out what GRANTs I need fora particularsituation. I have a userwho needs to be able to run some MySQL scripts that create and load tables in a database named NFL. He is accessing MySQL remotely from a client on a Windows machine. Our server is running in Linux Mandrake 9.1; the client is Windows 98SE. I'verun the following grantsfor him: grant all on NFL.* to [EMAIL PROTECTED] indentified by 'x'; grant all on NFL.* to [EMAIL PROTECTED] identified by 'x'; grant file on NFL.* to [EMAIL PROTECTED] identified by 'x'; grant file on NFL.* to [EMAIL PROTECTED] identified by 'x'; When I try signing on as him from my remote Windows client, he can connect to MySQL and get to the mysql prompt. He can run the script which creates and loads the tables. However, he gets "Access Denied" on the Load Data Infile statements when the script executes. 1. Why is this happening? The Load Data article says he needs the File privilege and I've given it to him. He also has all privileges on the NFL database. What more do I need to do for him? 2. Are the privileges given to [EMAIL PROTECTED] redundant with the privileges given to [EMAIL PROTECTED]? They *look* redundant to me; I suspect I've misinterpreted something I read in the manual. Can I get by with giving him just the [EMAIL PROTECTED] privileges? Do I need to give him anything else to account for the fact that he is coming in from a remote client? We are running MySQL 4.0.11a. gamma. Rhino---rhino1 AT sympatico DOT ca"If you want the best seat in the house, you'll have to move the cat."
Re: AW: C compared to C++/Java; Was: Re: InnoDB Hot Backup + MySQL em bedded?
I prefer TCL because on my opinion it is the best of both worlds ( i never had a memleak except with a bad API written in C). Bad...written in C...was it a SCO library? Complex tasks should be done from skilled programmers - thats all. Additionally, complex tasks should be decomposed into simple tasks by skilled programmers. :-) Trying to turn this discussion back toward MySQL, a language not mentioned here that has withstood the test of time is PERL. When looking at the results coming from and RDBMS, it is basically a list of data. This is where PERL excels, dealing with text and manipulating it. Showing my age, I will state that I have been using C for over 21 years, and PERL almost as long. When it comes to dealing with speed, C is likely to be the best candidate since it is just a small step above the assembly language that would be the fastest, but least maintainable. I am somewhat familiar with this due to my 13 years working inside the Unix kernel at various companies. Coupled with 9 years of RDBMS experience, including a 200 GB Oracle database back in '95, I have dealt with many different programming tasks. Bottom line on all this is using the right tool for the job. As an analogy, it is quite possible to remove a switch plate from the wall with a claw hammer. But the results aren't real pretty. :) Knowing which tool to utilize, is where experience and skill comes into play for the programmer worth his salt. Brad Eacker ([EMAIL PROTECTED]) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: GRANT question
Rhino [EMAIL PROTECTED] wrote: I am new to most aspects of MySQL administration so I was wondering if someone can help me figure out what GRANTs I need for a particular situation. I have a user who needs to be able to run some MySQL scripts that create and load tables in a database named NFL. He is accessing MySQL remotely from a client on a Windows machine. Our server is running in Linux Mandrake 9.1; the client is Windows 98SE. I've run the following grants for him: grant all on NFL.* to [EMAIL PROTECTED] indentified by 'x'; grant all on NFL.* to [EMAIL PROTECTED] identified by 'x'; grant file on NFL.* to [EMAIL PROTECTED] identified by 'x'; grant file on NFL.* to [EMAIL PROTECTED] identified by 'x'; When I try signing on as him from my remote Windows client, he can connect to MySQL and get to the mysql prompt. He can run the script which creates and loads the tables. However, he gets Access Denied on the Load Data Infile statements when the script executes. 1. Why is this happening? The Load Data article says he needs the File privilege and I've given it to him. He also has all privileges on the NFL database. What more do I need to do for him? FILE is a global level privilege. You should grant: GRANT FILE ON *.* TO [EMAIL PROTECTED] IDENTIFIED BY 'x'; 2. Are the privileges given to [EMAIL PROTECTED] redundant with the privileges given to [EMAIL PROTECTED] They *look* redundant to me; I suspect I've misinterpreted something I read in the manual. Can I get by with giving him just the [EMAIL PROTECTED] privileges? Do I need to give him anything else to account for the fact that he is coming in from a remote client? localhost on Unix system means that you are using Unix socket connection. 127.0.0.1 means that you are using TCP/IP connection. But you can't use these accounts to connect to the MySQL server remotely. Check with CURRENT_USER() function username and hostname that current connection was authenticated as. We are running MySQL 4.0.11a. gamma. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Any way to make anyhost '%' include localhost
Jason Joines [EMAIL PROTECTED] wrote: We have a web server where users connect to mysql in scripts, etc., via the host name localhost. We would also like for them to be able to manage their databases from their office dekstops with various utilities. If we grant rights to [EMAIL PROTECTED], they can connect from the web/mysql server itself but not from other locations as expected. However, if we grant rights to username@'%', they can connect from any host other than the web server. To allow connections from any host (including the web/mysql server, localhost) we have to try and keep two sets of permissions synchonized for each user, [EMAIL PROTECTED] and [EMAIL PROTECTED], effectively doubling the number of users we have to manage. Is there any way to allow connections from both the localhost and any other host with one set of permissions per user? When you connect from local box you can use '127.0.0.1' instead of 'localhost'. $ mysql -uegor ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) $ mysql -uegor -h127.0.0.1 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 18 to server version: 4.0.18-standard-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql SELECT CURRENT_USER(); ++ | CURRENT_USER() | ++ | [EMAIL PROTECTED] | ++ 1 row in set (0.00 sec) -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Any way to make anyhost '%' include localhost
At 8:21 -0600 2/21/04, Jason Joines wrote: We have a web server where users connect to mysql in scripts, etc., via the host name localhost. We would also like for them to be able to manage their databases from their office dekstops with various utilities. If we grant rights to [EMAIL PROTECTED], they can connect from the web/mysql server itself but not from other locations as expected. However, if we grant rights to username@'%', they can connect from any host other than the web server. To allow connections from any host (including the web/mysql server, localhost) we have to try and keep two sets of permissions synchonized for each user, [EMAIL PROTECTED] and [EMAIL PROTECTED], effectively doubling the number of users we have to manage. Is there any way to allow connections from both the localhost and any other host with one set of permissions per user? Check the user table to see if there is an account with a Host value of 'localhost' and a User value of '' (empty string). If there is, remove it (DELETE FROM user WHERE Host='localhost' AND User='') and then do FLUSH PRIVILEGES. The reason this happens is explained here: http://www.mysql.com/doc/en/Connection_access.html See the discussion about user table sorting. -- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com MySQL Users Conference: April 14-16, 2004 http://www.mysql.com/uc2004/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Changing innodb_log_file_size
Can I just do a clean shutdown of MySQL, change my configured innodb_log_file_size, then restart? Or is there more I need to do to make sure the current log files are flushed to the data files before changing their size? Thanks -keith -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: GRANT question
Followup questions interspersed below - Original Message - From: Egor Egorov [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 21, 2004 12:29 PM Subject: Re: GRANT question Rhino [EMAIL PROTECTED] wrote: I am new to most aspects of MySQL administration so I was wondering if someone can help me figure out what GRANTs I need for a particular situation. I have a user who needs to be able to run some MySQL scripts that create and load tables in a database named NFL. He is accessing MySQL remotely from a client on a Windows machine. Our server is running in Linux Mandrake 9.1; the client is Windows 98SE. I've run the following grants for him: grant all on NFL.* to [EMAIL PROTECTED] indentified by 'x'; grant all on NFL.* to [EMAIL PROTECTED] identified by 'x'; grant file on NFL.* to [EMAIL PROTECTED] identified by 'x'; grant file on NFL.* to [EMAIL PROTECTED] identified by 'x'; When I try signing on as him from my remote Windows client, he can connect to MySQL and get to the mysql prompt. He can run the script which creates and loads the tables. However, he gets Access Denied on the Load Data Infile statements when the script executes. 1. Why is this happening? The Load Data article says he needs the File privilege and I've given it to him. He also has all privileges on the NFL database. What more do I need to do for him? FILE is a global level privilege. You should grant: GRANT FILE ON *.* TO [EMAIL PROTECTED] IDENTIFIED BY 'x'; So, am I correct in understanding that I can't give the FILE privilege for a single database or table? That means my user can load *any* table in *any* database when I only want him to be able to load the tables in one database, which is more access than I wanted to give him. I guess I'll either have to trust him or run the scripts myself. 2. Are the privileges given to [EMAIL PROTECTED] redundant with the privileges given to [EMAIL PROTECTED] They *look* redundant to me; I suspect I've misinterpreted something I read in the manual. Can I get by with giving him just the [EMAIL PROTECTED] privileges? Do I need to give him anything else to account for the fact that he is coming in from a remote client? localhost on Unix system means that you are using Unix socket connection. 127.0.0.1 means that you are using TCP/IP connection. But you can't use these accounts to connect to the MySQL server remotely. Check with CURRENT_USER() function username and hostname that current connection was authenticated as. I'm confused by your answer. The privileges he currently has *do* allow him to connect to the MySQL server remotely. (We are using SSH as our Windows client.) I ran the query select current_user() from NFL.Teams and got the following result while signed on as my user: [EMAIL PROTECTED] Does this mean that I should revoke the privileges given to [EMAIL PROTECTED] Honestly, I'm not sure whether I should be using Unix sockets or TCP/IP; I'm not sure I understand the implications of using either one to MySQL. By the way, I change the File privilege as you suggested - and nothing else - and I can now execute the script successfully, including the LOAD DATA commands, while logged on as 'brian'. Rhino We are running MySQL 4.0.11a. gamma. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: GRANT question
At 13:09 -0500 2/21/04, Rhino wrote: Followup questions interspersed below - Original Message - From: Egor Egorov [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 21, 2004 12:29 PM Subject: Re: GRANT question Rhino [EMAIL PROTECTED] wrote: I am new to most aspects of MySQL administration so I was wondering if someone can help me figure out what GRANTs I need for a particular situation. I have a user who needs to be able to run some MySQL scripts that create and load tables in a database named NFL. He is accessing MySQL remotely from a client on a Windows machine. Our server is running in Linux Mandrake 9.1; the client is Windows 98SE. I've run the following grants for him: grant all on NFL.* to [EMAIL PROTECTED] indentified by 'x'; grant all on NFL.* to [EMAIL PROTECTED] identified by 'x'; grant file on NFL.* to [EMAIL PROTECTED] identified by 'x'; grant file on NFL.* to [EMAIL PROTECTED] identified by 'x'; When I try signing on as him from my remote Windows client, he can connect to MySQL and get to the mysql prompt. He can run the script which creates and loads the tables. However, he gets Access Denied on the Load Data Infile statements when the script executes. 1. Why is this happening? The Load Data article says he needs the File privilege and I've given it to him. He also has all privileges on the NFL database. What more do I need to do for him? FILE is a global level privilege. You should grant: GRANT FILE ON *.* TO [EMAIL PROTECTED] IDENTIFIED BY 'x'; So, am I correct in understanding that I can't give the FILE privilege for a single database or table? That means my user can load *any* table in *any* database when I only want him to be able to load the tables in one database, which is more access than I wanted to give him. I guess I'll either have to trust him or run the scripts myself. No. You must grant FILE on the global level. That means you can read or write files. It doesn't imply anything about which tables you can access. If you have no access to a table, you can't read a file into it, for example. 2. Are the privileges given to [EMAIL PROTECTED] redundant with the privileges given to [EMAIL PROTECTED] They *look* redundant to me; I suspect I've misinterpreted something I read in the manual. Can I get by with giving him just the [EMAIL PROTECTED] privileges? Do I need to give him anything else to account for the fact that he is coming in from a remote client? localhost on Unix system means that you are using Unix socket connection. 127.0.0.1 means that you are using TCP/IP connection. But you can't use these accounts to connect to the MySQL server remotely. Check with CURRENT_USER() function username and hostname that current connection was authenticated as. I'm confused by your answer. The privileges he currently has *do* allow him to connect to the MySQL server remotely. (We are using SSH as our Windows client.) I ran the query select current_user() from NFL.Teams and got the following result while signed on as my user: [EMAIL PROTECTED] Does this mean that I should revoke the privileges given to [EMAIL PROTECTED] Honestly, I'm not sure whether I should be using Unix sockets or TCP/IP; I'm not sure I understand the implications of using either one to MySQL. If CURRENT_USER() is returning [EMAIL PROTECTED], it means you're not actually connecting from a remote server, you are connecting to the MySQL server from the same host where the server is running. The host that you specify in the GRANT statement is not the host that the MySQL server runs on. It is the client host *from which* you plan to connect to the server. By the way, I change the File privilege as you suggested - and nothing else - and I can now execute the script successfully, including the LOAD DATA commands, while logged on as 'brian'. Rhino -- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com MySQL Users Conference: April 14-16, 2004 http://www.mysql.com/uc2004/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
moving MYI's to ramdisk
I've noticed a 4 times insert speed improvement by moving the MYI index file of a myisam table to a ramdisk. The MYD file is still on a physical disk, and I benchmarked the difference between moving just the index file, or moving both, and it was only a 10% difference in speed. The table has a large fulltext index. Has anyone else played with moving MYI files to ramdisk for performance? Any caveats that you know of, besides running out of ramdisk space? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Changing innodb_log_file_size
Keith Thompson [EMAIL PROTECTED] wrote: Can I just do a clean shutdown of MySQL, change my configured innodb_log_file_size, then restart? Or is there more I need to do to make sure the current log files are flushed to the data files before changing their size? Shutdown MySQL server. Copy old log files to the safe place. Then remove old log files from the log file directory, edit my.cnf and start MySQL server. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: AW: C compared to C++/Java; Was: Re: InnoDB Hot Backup + MySQL em bedded?
I would say using C in C++ compiler or C++ itself is best. come see my http://www.DhakaStockExchangeGame.com , its totally written C++. My upcoming NYSEGame.com is also using C++. This time I made 4 base classes to handle the whole thing . Soon I will make those class public. Pete McNeil wrote: Hello, Personally, I think it's a matter of choosing the best tool for the job. For myself and my team, Java is the work horse particularly - suited for rapid application development and when there is a strong cross platform requirement. This means that Java tends to dominate our utilities and user-interface code. When heavy lifting is required we move to C++. Java's object model is simplistic (both a strength and a weakness). C++ is extremely flexible and efficient. To a greater extent, C/C++ will let you do a lot of things you really shouldn't. Java isn't immune to this. After all, bad engineering is bad engineering. In both cases it's up to the programmer to keep things where they should be. As for seeing a lot of bad Java programs and a lot of bad C/C++ programs... In my experience I've seen about the same of both... but a bad C/C++ program is less likely to survive deployment than a bad Java program. My $0.03. _M At 04:39 AM 2/21/2004, Franz, Fa. PostDirekt MA wrote: Hi, this discussion is useless, object or procedure is not realy the question. You need to know how to build a good programm, if you cannot create a good programm, no matter what language. The amount of realy bad java-programs (90% i have seen were realy bad) shows, that it is maybe not a good idea, to make programming to easy :o) . There are a lot of people, thinkink a complex task is better done with an oo-language. My boss is this opinion and had already 2 memleaks in C++, he searched for one 6 weeks. So the truth seems to be, that an oo-language (especially java) makes it easy to programm complex tasks, but what comes out in the end is worth. I prefer TCL because on my opinion it is the best of both worlds ( i never had a memleak except with a bad API written in C). Complex tasks should be done from skilled programmers - thats all. mfg Klaus -Ursprüngliche Nachricht- Von: Heikki Tuuri [mailto:[EMAIL PROTECTED] Gesendet: Samstag, 21. Februar 2004 09:30 An: [EMAIL PROTECTED] Betreff: C compared to C++/Java; Was: Re: InnoDB Hot Backup + MySQL embedded? Jochem, - Original Message - From: Jochem van Dieten [EMAIL PROTECTED] Newsgroups: mailing.database.myodbc Sent: Saturday, February 21, 2004 2:10 AM Subject: Re: InnoDB Hot Backup + MySQL embedded? Sasha Pachev wrote: Heikki Tuuri wrote: C versus object-oriented lanuguages like C++/Java is a topic I have discussed a lot with programmers. I believe that traditional procedural approaches and languages, like C, are the best for 'systems programming', by which I mean implementing anything with complex data structures and lots of parallelism. A DBMS is a typical example of such a complex program. 3) A weakness of C compared to Java is memory management. In C you can easily write programs that leak memory or run over allocated buffers. In practice, it has turned out to be relatively easy to keep these memory management bugs at a tolerable level in our C programs, so that a move to a language with automatic memory management is not needed. In Java is it easy to write a program that wastes large amounts of memory, which is worse than a leak. In C, you are full from the start, and then you leak a drop at a time until you are empty. In Java , you are empty from the start, and you have nothing to leak anyway even if you could :-) http://citeseer.nj.nec.com/shah01java.html here is a .pdf version of the paper: http://gist.cs.berkeley.edu/~mashah/java-paper/paper.pdf The authors used a 2 x Pentium III 667 MHz, Linux-2.2.16, Sun JDK 1.3, and Java HotSpot Server JVM 1.3.0. to implement a 'data-flow' query processor. Their conclusion is that the memory management and the garbage collection of Java is inefficient. The graph that they present shows an up to 2.5-fold performance degradation with the Java garbage collector, compared to their own tailored memory management system. I worked with Entity Systems Oy in the 1980s. We developed a Lisp interpreter and a compiler, and a Prolog interpreter. At that time, the inefficiency of the garbage collection in Lisp and Prolog was a serious problem. I am not familiar with more modern garbage collection algorithms, but the paper of Shah et al. suggests that there are still problems today. In the 1980s, the research group of Mike Stonebraker initially started implementing Postgres in a mixture of Lisp and C, but they later abandoned Lisp. Jochem Regards, Heikki -- I don't get it immigrants don't work and steal our jobs - Loesje -- Aftab Jahan Subedar CEO/Software Engineer Subedar Technologies Subedar Baag Bibir Bagicha #1 North Jatrabari Dhaka 1204
Re: GRANT question
More followups below - Original Message - From: Paul DuBois [EMAIL PROTECTED] To: Rhino [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, February 21, 2004 1:25 PM Subject: Re: GRANT question At 13:09 -0500 2/21/04, Rhino wrote: Followup questions interspersed below - Original Message - From: Egor Egorov [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 21, 2004 12:29 PM Subject: Re: GRANT question Rhino [EMAIL PROTECTED] wrote: I am new to most aspects of MySQL administration so I was wondering if someone can help me figure out what GRANTs I need for a particular situation. I have a user who needs to be able to run some MySQL scripts that create and load tables in a database named NFL. He is accessing MySQL remotely from a client on a Windows machine. Our server is running in Linux Mandrake 9.1; the client is Windows 98SE. I've run the following grants for him: grant all on NFL.* to [EMAIL PROTECTED] indentified by 'x'; grant all on NFL.* to [EMAIL PROTECTED] identified by 'x'; grant file on NFL.* to [EMAIL PROTECTED] identified by 'x'; grant file on NFL.* to [EMAIL PROTECTED] identified by 'x'; When I try signing on as him from my remote Windows client, he can connect to MySQL and get to the mysql prompt. He can run the script which creates and loads the tables. However, he gets Access Denied on the Load Data Infile statements when the script executes. 1. Why is this happening? The Load Data article says he needs the File privilege and I've given it to him. He also has all privileges on the NFL database. What more do I need to do for him? FILE is a global level privilege. You should grant: GRANT FILE ON *.* TO [EMAIL PROTECTED] IDENTIFIED BY 'x'; So, am I correct in understanding that I can't give the FILE privilege for a single database or table? That means my user can load *any* table in *any* database when I only want him to be able to load the tables in one database, which is more access than I wanted to give him. I guess I'll either have to trust him or run the scripts myself. No. You must grant FILE on the global level. That means you can read or write files. It doesn't imply anything about which tables you can access. If you have no access to a table, you can't read a file into it, for example. Okay, that's a relief; I didn't want to give him access to other databases. He doesn't have many computer skills yet so there's a very good chance that he could mess up the other databases if he decided to give it a try. Now that I know he can't access the other databases, I'm no longer worried. 2. Are the privileges given to [EMAIL PROTECTED] redundant with the privileges given to [EMAIL PROTECTED] They *look* redundant to me; I suspect I've misinterpreted something I read in the manual. Can I get by with giving him just the [EMAIL PROTECTED] privileges? Do I need to give him anything else to account for the fact that he is coming in from a remote client? localhost on Unix system means that you are using Unix socket connection. 127.0.0.1 means that you are using TCP/IP connection. But you can't use these accounts to connect to the MySQL server remotely. Check with CURRENT_USER() function username and hostname that current connection was authenticated as. I'm confused by your answer. The privileges he currently has *do* allow him to connect to the MySQL server remotely. (We are using SSH as our Windows client.) I ran the query select current_user() from NFL.Teams and got the following result while signed on as my user: [EMAIL PROTECTED] Does this mean that I should revoke the privileges given to [EMAIL PROTECTED] Honestly, I'm not sure whether I should be using Unix sockets or TCP/IP; I'm not sure I understand the implications of using either one to MySQL. If CURRENT_USER() is returning [EMAIL PROTECTED], it means you're not actually connecting from a remote server, you are connecting to the MySQL server from the same host where the server is running. Are you saying that connecting via SSH is effectively the same as sitting in the same room as the server and accessing its command line directly? My user and I are not even in the same city as the server so I thought that inevitably meant that a program like SSH had to be treated as a client, not as if it were the host itself. Forgive me if this is a stupid question but my knowledge of networking is sketchy at best. The host that you specify in the GRANT statement is not the host that the MySQL server runs on. It is the client host *from which* you plan to connect to the server. If the use of SSH means that I am directly accessing the server in a *local* fashion, rather than as a client, does this mean I can eliminate the GRANTs to 127.0.0.1 or localhost? If yes, which one would be the sensible one to eliminate? I don't know the pros and cons of
how big can Query Cache get?
Anyone using TONS of Query Cache for a high-traffic site? Our search server is really sweating. I was about to jump through a LOT of software loops to program query caching at the app level, when I realized that MySQL had it built-in already. (We're using newest: 4.0.18) Seems we've got plenty of Qcache_free_memory (see below) - so I'm wondering... Has anyone set their query_cache_size= setting really high like 1GB of RAM - to see how it helps? Any more articles or info on this besides the docs at http://www.mysql.com/doc/en/Query_Cache.html ? | Key_blocks_used | 29625 | | Key_read_requests| 31993562 | | Key_reads| 28450 | | Key_write_requests | 204631 | | Key_writes | 131756 | | Max_used_connections | 140| | Not_flushed_key_blocks | 0 | | Not_flushed_delayed_rows | 0 | | Open_tables | 100| | Open_files | 146| | Open_streams | 0 | | Opened_tables| 106| | Questions| 1337108| | Qcache_queries_in_cache | 11363 | | Qcache_inserts | 530809 | | Qcache_hits | 520845 | | Qcache_lowmem_prunes | 0 | | Qcache_not_cached| 1984 | | Qcache_free_memory | 255088000 | | Qcache_free_blocks | 4773 | | Qcache_total_blocks | 27515 | | Rpl_status | NULL | | Select_full_join | 1005 | | Select_full_range_join | 0 | | Select_range | 22 | | Select_range_check | 803| | Select_scan | 6271 | | Slave_open_temp_tables | 0 | | Slave_running| ON | | Slow_launch_threads | 0 | | Slow_queries | 138| | Sort_merge_passes| 0 | | Sort_range | 105822 | | Sort_rows| 1479015| | Sort_scan| 5009 | | Table_locks_immediate| 638173 | | Table_locks_waited | 5449 | | Threads_cached | 8 | | Threads_created | 4300 | | Threads_connected| 111| | Threads_running | 2 | -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: GRANT question
At 14:30 -0500 2/21/04, Rhino wrote: More followups below 1. Why is this happening? The Load Data article says he needs the File privilege and I've given it to him. He also has all privileges on the NFL database. What more do I need to do for him? FILE is a global level privilege. You should grant: GRANT FILE ON *.* TO [EMAIL PROTECTED] IDENTIFIED BY 'x'; So, am I correct in understanding that I can't give the FILE privilege for a single database or table? That means my user can load *any* table in *any* database when I only want him to be able to load the tables in one database, which is more access than I wanted to give him. I guess I'll either have to trust him or run the scripts myself. No. You must grant FILE on the global level. That means you can read or write files. It doesn't imply anything about which tables you can access. If you have no access to a table, you can't read a file into it, for example. Okay, that's a relief; I didn't want to give him access to other databases. He doesn't have many computer skills yet so there's a very good chance that he could mess up the other databases if he decided to give it a try. Now that I know he can't access the other databases, I'm no longer worried. You should still be worried. FILE is a dangerous privilege. http://www.mysql.com/doc/en/Privileges_provided.html See the mention of FILE near the end. 2. Are the privileges given to [EMAIL PROTECTED] redundant with the privileges given to [EMAIL PROTECTED] They *look* redundant to me; I suspect I've misinterpreted something I read in the manual. Can I get by with giving him just the [EMAIL PROTECTED] privileges? Do I need to give him anything else to account for the fact that he is coming in from a remote client? localhost on Unix system means that you are using Unix socket connection. 127.0.0.1 means that you are using TCP/IP connection. But you can't use these accounts to connect to the MySQL server remotely. Check with CURRENT_USER() function username and hostname that current connection was authenticated as. I'm confused by your answer. The privileges he currently has *do* allow him to connect to the MySQL server remotely. (We are using SSH as our Windows client.) Then you're not connecting to the MySQL server remotely. You're using SSH to connect to the MySQL server *host* remotely, and then from that host making a local connection to the MySQL server running on that host. So in this case, all you do need is to grant privileges to a [EMAIL PROTECTED] account. I ran the query select current_user() from NFL.Teams and got the following result while signed on as my user: [EMAIL PROTECTED] Does this mean that I should revoke the privileges given to [EMAIL PROTECTED] Honestly, I'm not sure whether I should be using Unix sockets or TCP/IP; I'm not sure I understand the implications of using either one to MySQL. If CURRENT_USER() is returning [EMAIL PROTECTED], it means you're not actually connecting from a remote server, you are connecting to the MySQL server from the same host where the server is running. Are you saying that connecting via SSH is effectively the same as sitting in the same room as the server and accessing its command line directly? My user and I are not even in the same city as the server so I thought that inevitably meant that a program like SSH had to be treated as a client, not as if it were the host itself. Forgive me if this is a stupid question but my knowledge of networking is sketchy at best. See above. As far as the MySQL server is concerned, you are accessing it from the same host were it is running. It doesn't know that you're really on some other machine. Yes, it's easy to get confused by this kind of stuff. :-) The host that you specify in the GRANT statement is not the host that the MySQL server runs on. It is the client host *from which* you plan to connect to the server. If the use of SSH means that I am directly accessing the server in a *local* fashion, rather than as a client, does this mean I can eliminate the GRANTs to 127.0.0.1 or localhost? If yes, which one would be the sensible one to eliminate? I don't know the pros and cons of using Unix sockets vs. TCP/IP. Just use localhost. To connect using the Unix socket file, connect to localhost (the default). To connect over TCP/IP, connect to 127.0.0.1. localhost should match them both. -- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com MySQL Users Conference: April 14-16, 2004 http://www.mysql.com/uc2004/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: GRANT question
Thanks, that clears things up pretty well. By the way, since you're on the documentation team, can you tell me what the official channels are for making suggestions about the documentation. I have some ideas about how to make it better Rhino -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: GRANT question
At 14:56 -0500 2/21/04, Rhino wrote: Thanks, that clears things up pretty well. By the way, since you're on the documentation team, can you tell me what the official channels are for making suggestions about the documentation. I have some ideas about how to make it better Mail to [EMAIL PROTECTED] -- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com MySQL Users Conference: April 14-16, 2004 http://www.mysql.com/uc2004/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
bdb tables: calculating bdb_max_lock
After running in production for about seven weeks, our dumps on one of our BDB tables performed with mysqldump began failing with the message: 'mysqldump: Error 1030: Got error 12 from table handler when dumping table `reference` at row: 255233'. Reviewing the error log and the MySQL doc, I see that that error message means that we should increase the bdb_max_lock variable from its default of 1. But nowhere can I find an algorithm for calculating an appropriate value. Can anyone point me to some information on this? Thanks, Jim Hopp -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Urgent: Prepared Statements C API hangup the Server - Help Urgent....
hi! A == Arunachalam [EMAIL PROTECTED] writes: A Hai MySQLians!!! A I have established the Successful Connection to MySQL from COBOL. A Now from COBOL I can able to query the MySQL and get back the A result sets using C APIs under MySQL 4.0.17-max both in windows A and Linux. Note that my Client is in Windows platform... A Its not enough for my application, I'm in need to use Prepared statements A for further SQL processing... A As per my searching I have found the right C API in libmysql.lib from A MySQL 5.0.0, (i have doubt: Is any eariler version 4.0.xx provides this???) A C API routines are: mysql_prepare(), mysql_bind_param(), mysql_execute(), A mysql_stmt_affected_rows(), mysql_fetch(), mysql_stmt_close()... You should probablty use MySQL 4.1 instead of MySQL 5.0 for testing this as we make more often releases for 4.1 than for 5.0 (until 4.1 is production ready). A I have installed MySQL 5.0.0-alpha for Windows and I have properly linked A thelibmysql.lib into my COBOL compiler... To verify the Parameter Passing A mechanism to the API routines i have taken the sample C code from MySQL A manual (URL: * http://www.mysql.com/doc/en/mysql_execute.html * ) A When I compiled this sample coding using VC++, it ask for *typelib.h* header A file, it is not given with insatllation pack, under the Mysql folder A (C:/MySQL/Include), I have searched on the net and include it accordingly. Thanks for notifying us about this. typelib.h should be included in the MySQL folder and we will do that for next MySQL windows release. (4.1.2) A After that i have made changes in some variable names becaz of it follows A other header files variable name as such. What changes did you have to make ? Including typelib.h should be enough. I will ask our windows team to verify that the example works ok with VC++ A Upon all the changes I can able to execute succcessfully the coding and it A does the function properly on the MySQL server database. A The PROBLEM I met is, Once this sample code executed and inserted data to A the Database the server get's hanged - why??? This shouldn't happen. Can you please describe exactly what you mean with a 'hang' ? - Does the connection in your test program stop respoding ? - Can you connect to mysqld with other clients ? - Does the MySQL server take all cpu In the tests directory of the MySQL source tree there is a test program 'client_test' that shows in detail how to use prepared statements with MySQL. A (Note that If I didn't run this coding or my COBOL coding the Server remain A function properly) A Kindly suggest me the solution or quote me the things i forgot to do... In the released 5.0 server there is some known bugs in the prepared statement handling for some specific prepared statements. We have fixed these bugs in 4.1.2 which should be available quite soon (we are just now closing the last open bugs in 4.1 to be able to make a new release ASAP). To get any problems you have fixed, you could try to make a standalone test case in C that we could try to repeate. Another option is to follow the instructions in the MySQL manual of how to debug MySQL and give us a stack trace of where mysqld is hanging. Another option is to use the debug version of mysqld and start it with --debug. The trace file that is written (in C:\ or /tmp) should give us a good idea of where the bug could be. Regards, Monty -- Michael Widenius [EMAIL PROTECTED] MySQL AB, CTO Helsinki, Finland Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Subselect in aggregate function in MySQL 4.1.1a-alpha
Hi Victoria, that's exactly what I needed. Works fine. I know Subselects only from Intrbas/Firebird so far. I know that I can pass a SELECT to the list of columns of a SELECT if it only returns one result (one col, one row). So I thought/hoped/imagined/expected I can pass a SELECT returning multiple rows in only one col to an aggregate function. Thanks and bye, Bernhard - Original Message - From: Victoria Reznichenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 19, 2004 2:34 PM Subject: Re: Subselect in aggregate function in MySQL 4.1.1a-alpha [EMAIL PROTECTED] wrote: Hi, I have some logging data from a webserver in a table and want to do some analysis. I infact want to see how many files are requested at one time. To do this I SELECT COUNT(time) anz FROM table GROUP BY time ORDER BY anz DESC This gives me the number of requests at any time. I now want to see the average number of requests per time. I thus thought I can use a subselect like SELECT AVG(SELECT COUNT(time) anz FROM table GROUP BY time) FROM table That seems impossible, it in fact simply does not work. Is it wrong by my design or is it MySQL design not to pass a subselect to an aggregate function? If I've got you right you need: SELECT AVG(anz) FROM (SELECT COUNT(time) anz FROM table GROUP BY time) as table1; -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Master refusing Replication connections
Help, I seem to be running into a problem with replication which up until now has served us well. We run mysql servers in pairs, with each server in a pair mastering off the other. So for example mysql1 masters off mysql2, which masters off mysql1. Friday morning one server stopped accepting connections for replication, let's call it mysql2. It's partner, called mysql1, has some log entries which seem on the face of it self explanatory... 040221 15:35:40 Slave I/O thread: error connecting to master '[EMAIL PROTECTED]:3306': Error: 'Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)' errno: 1045 retry-time: 60 retries: 86400 Now even I can read that it doesn't like the username/password combination. Let's just settle for the fact that I can change the username/password combination to any set of usernames/passwords that are valid for replication connections and I still get the same error. In cases where that username/password are enabled to logon for other purposes, say my personal sysadmin account which has all access enabled, I can log in fine using the mysql client, but when trying that username/password in replication I get the same error as above. So one of my server pairs has fallen way behind in what is current data... I have moved all my application servers to point to the fully up to date server. I can't point them to mysql1 and bounce mysql2, the data is a day and a half out of date. So far I've tried everything I know to get replication working short of bouncing mysql2... the seemingly problematic master. Clearly bouncing the only server we have will cause me some heartache with the application servers and I will have to co-ordinate the timing to such an action with all our clients... Our next scheduled maintenance window isn't till Friday morning, I don't want to run on one server for a week here. Anyone got any ideas or suggestions on how I can resolve this issue? Will bouncing even help me? Best Regards, Bruce -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Any way to make anyhost '%' include localhost
Paul DuBois wrote: At 8:21 -0600 2/21/04, Jason Joines wrote: We have a web server where users connect to mysql in scripts, etc., via the host name localhost. We would also like for them to be able to manage their databases from their office dekstops with various utilities. If we grant rights to [EMAIL PROTECTED], they can connect from the web/mysql server itself but not from other locations as expected. However, if we grant rights to username@'%', they can connect from any host other than the web server. To allow connections from any host (including the web/mysql server, localhost) we have to try and keep two sets of permissions synchonized for each user, [EMAIL PROTECTED] and [EMAIL PROTECTED], effectively doubling the number of users we have to manage. Is there any way to allow connections from both the localhost and any other host with one set of permissions per user? Check the user table to see if there is an account with a Host value of 'localhost' and a User value of '' (empty string). If there is, remove it (DELETE FROM user WHERE Host='localhost' AND User='') and then do FLUSH PRIVILEGES. The reason this happens is explained here: http://www.mysql.com/doc/en/Connection_access.html See the discussion about user table sorting. Thanks, I certainly had that common misconception. Removing the mysql.user table record for ''@localhost made the permissions behave the way we wanted. I sure don't remember adding that though. Something I didn't see in the document was a blank host value in the users table. What's the difference between username@'%' and username@''? Thanks, Jason Joines === -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Any way to make anyhost '%' include localhost
At 18:04 -0600 2/21/04, Jason Joines wrote: Paul DuBois wrote: At 8:21 -0600 2/21/04, Jason Joines wrote: We have a web server where users connect to mysql in scripts, etc., via the host name localhost. We would also like for them to be able to manage their databases from their office dekstops with various utilities. If we grant rights to [EMAIL PROTECTED], they can connect from the web/mysql server itself but not from other locations as expected. However, if we grant rights to username@'%', they can connect from any host other than the web server. To allow connections from any host (including the web/mysql server, localhost) we have to try and keep two sets of permissions synchonized for each user, [EMAIL PROTECTED] and [EMAIL PROTECTED], effectively doubling the number of users we have to manage. Is there any way to allow connections from both the localhost and any other host with one set of permissions per user? Check the user table to see if there is an account with a Host value of 'localhost' and a User value of '' (empty string). If there is, remove it (DELETE FROM user WHERE Host='localhost' AND User='') and then do FLUSH PRIVILEGES. The reason this happens is explained here: http://www.mysql.com/doc/en/Connection_access.html See the discussion about user table sorting. Thanks, I certainly had that common misconception. Removing the mysql.user table record for ''@localhost made the permissions behave the way we wanted. I sure don't remember adding that though. You probably didn't add it. It's one of the default accounts that is created during the MySQL installation procedure. I find that the anonymous-user accounts aren't very helpful, so I always remove them. Then this confusing phenomenon doesn't occur. Something I didn't see in the document was a blank host value in the users table. What's the difference between username@'%' and username@''? In the user (not users) table, they're the same. '%' is probably preferable, because it's more easily recognized as a pattern. -- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com MySQL Users Conference: April 14-16, 2004 http://www.mysql.com/uc2004/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Encryption Issue
I would like to encrypt informaton in MySQL DB using the AES_ENCRYPT function, but what if someone looks into the log files? Unfortunately, i cannot prevent access to that computer... FBR
mysqlgui error
Hi my nma eis rick and I am new to the above listed program (linux aswell) and have encounted a problem which I cannot fix I have DL'd you 1.7.5 static mysqlgui , unpacked it , When i open the folder and hit the exe all it does is show me the splash screen and then in my console it says mysqlgui segmentation error. thnx for any help BTW I am using mandrake 9.1 __ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Mysqldump problem in output UTF-8 Char
I have a table create table friend( f_code int(7) not null AUTO_INCREMENT, c_name varchar(20), //Use to store Chinese Name e_name varchar(50) //use to store English Name ); in which table i set to use Charset (UTF-8). But When i use mysqlmysqldump -u myname -p mypwd telbookbook.txt, all string of table friend's c_name will become ?. any one face this promble before? any one can get me some suggest,please? ... http://ringtone.yahoo.com.hk/
re: Mysqldump problem in output UTF-8 Char
in which table i set to use Charset (UTF-8). But When i use mysqlmysqldump -u myname -p mypwd telbookbook.txt, all string of table friend's c_name will become ?. Have you tried: mysqldump --default-character-set=utf8 -u myname -p mypwd telbookbook.txt If that doesn't work, which version of MySQL are you using? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]