Implementing Quota's on Databases
Hello Everybody, I want to implement disk quota's for various MySQL databases. I checked out various books,but did not find the answere. Can you please help me in achieving my goal ? I am using Red Hat Linux 7. Regards Chintan - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Implementing Quota's on Databases
On Sat, 05 May 2001 16:27:05 +0530 chintanp [EMAIL PROTECTED] wrote: Hello Everybody, I want to implement disk quota's for various MySQL databases. I checked out various books,but did not find the answere. Can you please help me in achieving my goal ? buy more diskspace I am using Red Hat Linux 7. Regards Chintan - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
sorted select
Hello, If I have a table like this MYID |time | some id creation time and the following query SELECT DISTINCT MYID from Table; How can I get the results ordered by time ? Any ideas ? Thank you ! -- Adi Tofan email : [EMAIL PROTECTED] ICQ#: 98771878 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: sorted select
So sprach [EMAIL PROTECTED] am Sat, May 05, 2001 at 12:30:27PM -: Your message cannot be posted because it appears to be either spam or simply off topic to our filter. To bypass the filter you must include one of the following words in your message: database,sql,query If you just reply to this message, and include the entire text of it in the reply, your reply will go through. However, you should first review the text of the message to make sure it has something to do with MySQL. You have written the following: So sprach Adi Tofan am Sat, May 05, 2001 at 03:27:42PM +0300: SELECT DISTINCT MYID from Table; How can I get the results ordered by time ? SELECT DISTINCT MYID from Table order by time; Alexander Skwar --=20 How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die g=FCnstige Art an Linux Distributionen zu kommen Uptime: 20 hours 4 minutes Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 20 hours 8 minutes - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Implementing Quota's on Databases
On Sat, 05 May 2001 16:27:05 +0530 chintanp [EMAIL PROTECTED] wrote: Hello Everybody, I want to implement disk quota's for various MySQL databases. I checked out various books,but did not find the answere. Can you please help me in achieving my goal ? Some more serious this time :) If you really in need for quota, i'm afraid you'll just have to run multiple instances of mysqld under different user accounts (mysql1, mysql2.. mysqlN), and limit the disk quota for the user account that this mysqld uses. You thus end up in a situation where you'd need a seperate mysqld for each database you want to protect. If your goal is to restrict users in the amount of disk space they use, i'd suggest you give them a telnet/ssh account and let them istall run their own mysql service. You also could set up a seperate partition, and link the database files to this partition. I think databases just weren't designed to restrict putting data in it... gl rene I am using Red Hat Linux 7. Regards Chintan - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
case insensitive regexp
Hi! I'm using version 3.23.37 of MySQL (for Windows). Why does REGEXP seems to be case insensitive? Queries like SELECT tom REGEXP tOm; returns 1 Why? And how can I solve it (to return 0)? Regards, Tom S. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Error 2002
Hi I have installed Mysql from the latest tar file and followed these steps. shell groupadd mysql shell useradd -g mysql mysql shell gunzip mysql-VERSION.tar.gz | tar -xvf - shell cd mysql-VERSION shell ./configure --prefix=/usr/local/mysql shell make shell make install shell scripts/mysql_install_db shell chown -R root /usr/local/mysql shell chown -R mysql /usr/local/mysql/var shell chgrp -R mysql /usr/local/mysql shell /usr/local/mysql/bin/safe_mysqld --user=mysql When I run mysql all i seem to be getting is : ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) Can anyone help? Thanks Gordon - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: case insensitive regexp
Tom Svensson wrote: Hi! I'm using version 3.23.37 of MySQL (for Windows). Why does REGEXP seems to be case insensitive? Queries like SELECT tom REGEXP tOm; returns 1 Why? And how can I solve it (to return 0)? Regards, Tom S. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php REGEXP is case insensitive by default, but can be case sensitive; it is explained in the manual ;) http://www.mysql.com/doc/P/a/Pattern_matching.html -- Joseph Bueno NetClub/Trader.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
API or ADO??
Hi again database, sql Should one rather use ADO or the API for Windows programming? I am in a situation at the moment and don't know which one to move forward with. My program is currently developed with ADO, so that seems a slightly more 'easy' route to go, except that some ADO features don't seem to be supported properly and so all I am really using ADO for at the moment is to view records, the API give me this same functionality, except some other things would need to be changed to work with the API. So, with the above, my question is more in terms of speed and reliability. Which would be better? Kind regards Warren ~ Warren van der Merwe Software Director PRT Trading (Pty) Ltd t/a RedTie Durban, South Africa Cell (+27-83) 262-9163 Office (+27-31) 767-0249 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: API or ADO??
What API are you referring to ...MyVbQL.dll ? If not you should check it out ... http://www.icarz.com/mysql/index.html In my opinion, MyVbQL is the API that you should use ... but my opinion is a little biased since I am the one that wrote it ... Eric Warren van der Merwe wrote: Hi again database, sql Should one rather use ADO or the API for Windows programming? I am in a situation at the moment and don't know which one to move forward with. My program is currently developed with ADO, so that seems a slightly more 'easy' route to go, except that some ADO features don't seem to be supported properly and so all I am really using ADO for at the moment is to view records, the API give me this same functionality, except some other things would need to be changed to work with the API. So, with the above, my question is more in terms of speed and reliability. Which would be better? Kind regards Warren ~ Warren van der Merwe Software Director PRT Trading (Pty) Ltd t/a RedTie Durban, South Africa Cell (+27-83) 262-9163 Office (+27-31) 767-0249 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: API or ADO??
I really like using ADO and I've had very good luck with it. I have used it extensively to connect to access, sybase, oracle, and mysql databases as well as other non relational data sources (using the correct provider). I believe that the flexibility is the best part about ADO. Therefore if your queries are fairly simple and are not taking advantage of some database specific feature, then standardizing on ADO would enable you to move the application more easily in the unlikely event that you outgrow MySQL. In a nutshell: ADO plusses: flexible and simple to code (few objects), easy to port and support in the future ADO minuses: Adds a layer of processing, therefor slower API plusses: speed API minuses: Yet another API to learn (however, it might be as easy as ADO, I don't know) Regards, Gary SuperID Huntress === FreeSQL.org offering free database hosting to developers Visit http://www.freesql.org - Original Message - From: Warren van der Merwe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, May 05, 2001 2:25 PM Subject: API or ADO?? Hi again database, sql Should one rather use ADO or the API for Windows programming? I am in a situation at the moment and don't know which one to move forward with. My program is currently developed with ADO, so that seems a slightly more 'easy' route to go, except that some ADO features don't seem to be supported properly and so all I am really using ADO for at the moment is to view records, the API give me this same functionality, except some other things would need to be changed to work with the API. So, with the above, my question is more in terms of speed and reliability. Which would be better? Kind regards Warren ~ Warren van der Merwe Software Director PRT Trading (Pty) Ltd t/a RedTie Durban, South Africa Cell (+27-83) 262-9163 Office (+27-31) 767-0249 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: API or ADO??
The application we develop here at icarz was written using MyODBC and ADO ... I wrote the MyVbQL API to replace the use of ADO in our application with minimal code changes ... The names and functionality of most of the methods and properties are modeled after ADO methods and properties ... Anyone using ADO should be able to make a transition to MyVbQL very easily ... Plus since it uses libmysql.dll you also get the extra functionality and flexibility that libmysql.dll provides ... Eric http://www.icarz.com/mysql/index.html ADO plusses: flexible and simple to code (few objects), easy to port and support in the future ADO minuses: Adds a layer of processing, therefor slower API plusses: speed API minuses: Yet another API to learn (however, it might be as easy as ADO, I don't know) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
newbie needs help setting paswords
I'bve been following SAM'S TEACH YOURSELF MYSQL and hit a glitch. Whenn I do what I'm told to do create passwords here's what happens prompt insert into user (host, user, password) values('localhost', 'myname' password('testpass'); I get the following error: Syntax error near unexoected token '(h' Daniel Goldin [EMAIL PROTECTED] Creative Director 323.225.1926 BlueLamp Productions www.blue-lamp.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: API or ADO??
Thanks for the feedback, I might opt for the MyVBQl because of the size of installation/ease of installation in comparison to hassling with ODBC stuff. However, this is not critical but certainly makes my life a little easier, with ADO I can set the datasource of a grid to the ado recordset and then any changed made to the grid are automatically updated in the database, can this still be done with the MyVBQl? Thanks Warren ~ Warren van der Merwe Software Director PRT Trading (Pty) Ltd t/a RedTie Durban, South Africa Cell (+27-83) 262-9163 Office (+27-31) 767-0249 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] ]On Behalf Of Eric Grau Sent: 05 May 2001 09:57 To: Gary Huntress Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: API or ADO?? The application we develop here at icarz was written using MyODBC and ADO ... I wrote the MyVbQL API to replace the use of ADO in our application with minimal code changes ... The names and functionality of most of the methods and properties are modeled after ADO methods and properties ... Anyone using ADO should be able to make a transition to MyVbQL very easily ... Plus since it uses libmysql.dll you also get the extra functionality and flexibility that libmysql.dll provides ... Eric http://www.icarz.com/mysql/index.html ADO plusses: flexible and simple to code (few objects), easy to port and support in the future ADO minuses: Adds a layer of processing, therefor slower API plusses: speed API minuses: Yet another API to learn (however, it might be as easy as ADO, I don't know) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
I'm NEW ! Can someone help me?
I have a server hosting my site that offers MySql and they have activated a login and password for me. I use windows 98 and write websites with code not an editor. I want to learn database programming and heard MySql was the best. I downloaded mysql-3.23.37-win.zip from www.mysql.com After unzipping and installing MySql I (following the instructions in the manual and the book) opened the MySqlManager in the bin directory and entered the information requested to register a server. I then tried to connect and received an error message. They told me at my hosting service that my host was my complete domain and user was * and password is But I continue to recieve an error message. What am I doing wrong? TPG [EMAIL PROTECTED]
I'm new can someone help me?
I have a server hosting my site that offers MySql and they have activated a login and password for me. I use windows 98 and write websites with code not an editor. I want to learn database programming and heard MySql was the best. I downloaded mysql-3.23.37-win.zip from www.mysql.com After unzipping and installing MySql I (following the instructions in the manual and the book) opened the MySqlManager in the bin directory and entered the information requested to register a server. I then tried to connect and received an error message. They told me at my hosting service that my host was my complete domain and user was * and password is But I continue to recieve an error message. What am I doing wrong? TPG [EMAIL PROTECTED]
Re: Implementing Quota's on Databases
On Sat, 5 May 2001 13:47:57 -0600 Zak Greant [EMAIL PROTECTED] wrote: chintanp wrote: I want to implement disk quota's for various MySQL databases. I checked out various books,but did not find the answere. Can you please help me in achieving my goal ? I am using Red Hat Linux 7. Hello, I had to do this for an employer a few years ago. I wrote a perl script that found the size of database directories in the MySQL data directory. I tied the directories back to users by using a simple text file. user_1:db_1,db_2 user_2:db_3 ... Then I grabbed a module from CPAN that does reporting of user quotas. IIRC, the only trouble that I ran into was trying to use the system's (an older BSD/OS) quota command to fetch user quota data... and put this in a cron job which removes write access attribute on database(s) when exceeding quota. sounds like a good tool to me :) Good Luck! Zak Greant Freelance Designer / Programmer / Writer PHP QA Team Member http://qa.php.net/ Am I working on a project for or with you? Check http://calendar.yahoo.ca/jagreant - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: newbie needs help setting paswords
On Sat, 5 May 2001, Daniel Goldin (E-mail) wrote: I'bve been following SAM'S TEACH YOURSELF MYSQL and hit a glitch. Whenn I do what I'm told to do create passwords here's what happens prompt insert into user (host, user, password) values('localhost', 'myname' password('testpass'); Try closing another parentheses right before the ; regards, thalis I get the following error: Syntax error near unexoected token '(h' Daniel Goldin [EMAIL PROTECTED] Creative Director 323.225.1926 BlueLamp Productions www.blue-lamp.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: newbie needs help setting paswords
On Sat, 5 May 2001 14:11:24 -0700 Daniel Goldin \(E-mail\) [EMAIL PROTECTED] wrote: I'bve been following SAM'S TEACH YOURSELF MYSQL and hit a glitch. Whenn I do what I'm told to do create passwords here's what happens prompt insert into user (host, user, password) values('localhost', 'myname' password('testpass'); try insert into user (host, user, password) values ('localhost', 'myname' password('testpass'); values() is seen as a function name, values () as keyword followed by parameters. MySQL parser has this behaviour by default. gl I get the following error: Syntax error near unexoected token '(h' Daniel Goldin [EMAIL PROTECTED] Creative Director 323.225.1926 BlueLamp Productions www.blue-lamp.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Performance Problems with Huge Table
I am having performance problems with my server with larger tables. I Have a 512MB Pentium III Red Hat Linux 7 server running MySQL version 3.23.32 packaged by Red Hat This server's /etc/my.cnf is as follows : [mysqld] pid-file=/var/run/mysqld/mysqld.pid datadir=/var/lib/mysql port=3306 socket=/var/lib/mysql/mysql.sock set-variable=max_connections=2000 skip-locking set-variable = key_buffer=384M set-variable = max_allowed_packet=1M set-variable = table_cache=512 set-variable = sort_buffer=2M set-variable = record_buffer=2M set-variable = thread_cache=8 set-variable = thread_concurrency=8 # Try number of CPU's*2 set-variable = myisam_sort_buffer_size=64M log-bin server-id = 1 [mysql.server] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid I have a table structure like this, including indexes : # Table structure for table 'tbl_Parts' # CREATE TABLE tbl_Parts ( Vendor varchar(30) NOT NULL default '', PartNumber varchar(20) NOT NULL default '', Suplier varchar(20) NOT NULL default '', Quantity int(11) default '0', Prico float default '0', Description varchar(50) NOT NULL default '', DateHour datetime NOT NULL default '-00-00 00:00:00', PRIMARY KEY (Vendor,PartNumber,Suplier), KEY index_data(DateHour), KEY index_Company(Suplier,DateHour), KEY index_description(Description,Vendor), KEY index_Vendor(Vendor) ) TYPE=MyISAM; As you can see I have also an Index for the Vendor. The problem is that when I do an statement (that I use pretty much) : SELECT DISTINCT(Vendor) from tbl_Parts order by Vendor; It takes up to 52 seconds to return it since my table tbl_Parts has 1.130.300 records. This SQL statement is always ran with a PHP script so that the user can Select the vendor and type the PartNumber he/she is looking for. Based on my config, structure and situation, is there anyone who could kindly help me on boost its performance? 52 seconds to return the SELECT DISTINCT statement is very long. By the way, my system has an SCSI HD which is quite fast for it. Thank you all, Carlos Fernando Scheidecker Antunes.
Re: Performance Problems with Huge Table
I would suggest creating a new table to hold vendor information. Then remove the varchar vendor field in the parts table and replace it with an integer that represents the vendorid from the vendor table you just created. This should speed things up consideribly. You can do a left join any time you want info from the vendor table included in queries involving the parts table. ryan - Original Message - From: Carlos Fernando Scheidecker Antunes [EMAIL PROTECTED] To: MySQL List [EMAIL PROTECTED] Sent: Saturday, May 05, 2001 4:53 PM Subject: Performance Problems with Huge Table I am having performance problems with my server with larger tables. I Have a 512MB Pentium III Red Hat Linux 7 server running MySQL version 3.23.32 packaged by Red Hat This server's /etc/my.cnf is as follows : [mysqld] pid-file=/var/run/mysqld/mysqld.pid datadir=/var/lib/mysql port=3306 socket=/var/lib/mysql/mysql.sock set-variable=max_connections=2000 skip-locking set-variable = key_buffer=384M set-variable = max_allowed_packet=1M set-variable = table_cache=512 set-variable = sort_buffer=2M set-variable = record_buffer=2M set-variable = thread_cache=8 set-variable = thread_concurrency=8 # Try number of CPU's*2 set-variable = myisam_sort_buffer_size=64M log-bin server-id = 1 [mysql.server] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid I have a table structure like this, including indexes : # Table structure for table 'tbl_Parts' # CREATE TABLE tbl_Parts ( Vendor varchar(30) NOT NULL default '', PartNumber varchar(20) NOT NULL default '', Suplier varchar(20) NOT NULL default '', Quantity int(11) default '0', Prico float default '0', Description varchar(50) NOT NULL default '', DateHour datetime NOT NULL default '-00-00 00:00:00', PRIMARY KEY (Vendor,PartNumber,Suplier), KEY index_data(DateHour), KEY index_Company(Suplier,DateHour), KEY index_description(Description,Vendor), KEY index_Vendor(Vendor) ) TYPE=MyISAM; As you can see I have also an Index for the Vendor. The problem is that when I do an statement (that I use pretty much) : SELECT DISTINCT(Vendor) from tbl_Parts order by Vendor; It takes up to 52 seconds to return it since my table tbl_Parts has 1.130.300 records. This SQL statement is always ran with a PHP script so that the user can Select the vendor and type the PartNumber he/she is looking for. Based on my config, structure and situation, is there anyone who could kindly help me on boost its performance? 52 seconds to return the SELECT DISTINCT statement is very long. By the way, my system has an SCSI HD which is quite fast for it. Thank you all, Carlos Fernando Scheidecker Antunes. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Question
Hi I am programer and testing MySQL. I have one question. Where can I find the source code MySQL of Windows version. Regards Krystian Miodynski [EMAIL PROTECTED]
Re: Question
Krystian Miodynski wrote: I am programer and testing MySQL. I have one question. Where can I find the source code MySQL of Windows version. The source for the Win version of MySQL can be downloaded from the mysql.com download page. --zak - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
images and mysql
Dear Sir/Madam, I use a mysql database on the web and use php to get information from it. Now I want to use pictures/images in the database. I've included a php script The information I get from the mysql database in a while statement. My question is, how do I get the picture available on the web, must I put this in the mysql-database and how do I do this? If anyone can help me, than I hope to get an e-mail from you at: [EMAIL PROTECTED] Thanks, Johan. Student ? require ('connect2.php'); echo html; echo 'body bgcolor=#FF text=#00 background=Afbeelding1.jpg bgproperties=fixed'; Echo h2Het Sportprogramma 2001/h2; echo br; $result = mysql_query ('SELECT * from Programma') or die (Invalid query); echo 'table border=2 width=100%'; while ($row=mysql_fetch_row($result)){ echo 'trtd width=16%'; echo $row[5]; echo /td; echo 'td width=16%'; echo $row[6]; echo /td; echo 'td width=16%'; echo $row[4]; echo /td; echo 'td width=16%'; echo $row[1]; echo /td; echo 'td width=16%'; echo $row[2]; echo /td; echo 'td width=16%'; echo $row[3]; echo /td/tr;} echo /table; mysql_close ($link); echo /body; echo /html; ?
Re: images and mysql
This topic has been discussed many times on the PHP General (archived at http://marc.theaimsgroup.com/?l=php-general) and PHP DB (archived at http://marc.theaimsgroup.com/?l=php-db) mailing lists. Search the archives for the terms 'MySQL images blob' and you will find a wealth of posts. Good Luck! --zak J.Heegsma wrote: I use a mysql database on the web and use php to get information from it. Now I want to use pictures/images in the database. I've included a php script The information I get from the mysql database in a while statement. My question is, how do I get the picture available on the web, must I put this in the mysql-database and how do I do this? [snip] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: can't shutdown mysqld (nicely or not) on OS X 10.0.2
Hi Jim, This is a known problem on OS X 10.0.x. I keep meaning to take a look at it, but haven't had the time ( I have to learn gdb and the mysql source first/at the same time). If you are already a familiar with gdb and can help the mysql programmers by finding out more info and/or even a fix, that would help get this fixed. safe_mysqld has the job of keeping a copy of mysqld running. If it finds mysqld not running (or if one dies?), it will start another. So if you kill -9 on safe_mysqld first and then on mysqld you can get them all stopped. If you just kill -9 mysqld then safe_mysqld is simply starting another for you (just doin' it's job don't cha know!). I'd love to get mysql working on OS X, I'm just really swamped right now and behind the learning curve for this unix stuff being a mac hack. One pointer I received from Sinisa (from the mysql dev team): Signal handling is all done in mysqld.cc in sql/ subdir. which is where we need to start I think since it appears that mysql's handling of the shutdown signal is not working. If you run the mysql-test-run script it has trouble and says: Warning; Aborted waiting on pid file: '/usr/local/mysql- test/var/run/mysqld-slave.pid' after 10 seconds Slave shutdown finished that's what makes it seem like the signals are not working. Either that or the file locking done on the pid file (what is that done for and who does it? I don't know). Let me know if you make any progress. Tyler On Saturday, May 5, 2001, at 10:58 AM, Jim McCarty wrote: From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: can't shutdown mysqld (nicely or not) on OS X 10.0.2 Description: After starting mysqld with: safe_mysqld --user-mysql I cannot shutdown the daemon. None of the mysqladmin commands work, kill -HUP does nothing and after using kill -9, mysqld restarts. I've tried with 10.0.1 as well as 10.0.2 and also trashing everything and rebuilding from the source again. How-To-Repeat: On my system (following instructions in INSTALL-SOURCE), DL 3.23.37 source and extract in /usr/local. From mysql-3.23.37/ run configure with: ./configure --with-pthread --with-named-curses-libs='' --with-named-thread-libs='' --prefix=/usr/local/mysql configure completes without hitch. Next, compile with: make -i compile completes without hitch. Then I 'make install', 'scripts/mysql_install_db' and the rest. I start testing the installation but I can't stop the daemon! I can only kill it with 'kill -9' but then it restarts again immediately. Fix: Submitter-Id: Originator:System Administrator Organization: MySQL support: none Synopsis: Cannot shutdown daemon on OS X 10.0.2 Severity: serious Priority: medium Category: mysql Class: sw-bug Release: mysql-3.23.37 (Source distribution) Environment: System: Darwin localhost 1.3.2 Darwin Kernel Version 1.3.2: Fri Apr 27 22:50:58 PDT 2001; root:xnu/xnu-124.7.obj~1/RELEASE_PPC Power Macintosh powerpc Some paths: /usr/bin/perl /usr/bin/make /usr/bin/cc Compilation info: CC='cc' CFLAGS='' CXX='c++' CXXFLAGS='' LDFLAGS='' LIBC: lrwxr-xr-x 1 root wheel 15 May 1 23:49 /usr/lib/libc.dylib - libSystem.dylib Configure command: ./configure --with-pthread --with-named-curses-libs= --with-named-thread-libs= --prefix=/usr/local/mysql Thanks, Jim - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail mysql-unsubscribe- [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: can't shutdown mysqld (nicely or not) on OS X 10.0.2
Tyler, Thanks for all the info... I'd love to help find the answer, but I don't know gdb (or even what it is, but I have heard those letters before :) So now I can start and stop the server... do any of the other issues you mention affect how mysql works for small databases? Thanks, Jim on 5/5/01 9:15 PM, tyler at [EMAIL PROTECTED] wrote: Hi Jim, This is a known problem on OS X 10.0.x. I keep meaning to take a look at it, but haven't had the time ( I have to learn gdb and the mysql source first/at the same time). If you are already a familiar with gdb and can help the mysql programmers by finding out more info and/or even a fix, that would help get this fixed. safe_mysqld has the job of keeping a copy of mysqld running. If it finds mysqld not running (or if one dies?), it will start another. So if you kill -9 on safe_mysqld first and then on mysqld you can get them all stopped. If you just kill -9 mysqld then safe_mysqld is simply starting another for you (just doin' it's job don't cha know!). I'd love to get mysql working on OS X, I'm just really swamped right now and behind the learning curve for this unix stuff being a mac hack. One pointer I received from Sinisa (from the mysql dev team): Signal handling is all done in mysqld.cc in sql/ subdir. which is where we need to start I think since it appears that mysql's handling of the shutdown signal is not working. If you run the mysql-test-run script it has trouble and says: Warning; Aborted waiting on pid file: '/usr/local/mysql- test/var/run/mysqld-slave.pid' after 10 seconds Slave shutdown finished that's what makes it seem like the signals are not working. Either that or the file locking done on the pid file (what is that done for and who does it? I don't know). Let me know if you make any progress. Tyler On Saturday, May 5, 2001, at 10:58 AM, Jim McCarty wrote: From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: can't shutdown mysqld (nicely or not) on OS X 10.0.2 Description: After starting mysqld with: safe_mysqld --user-mysql I cannot shutdown the daemon. None of the mysqladmin commands work, kill -HUP does nothing and after using kill -9, mysqld restarts. I've tried with 10.0.1 as well as 10.0.2 and also trashing everything and rebuilding from the source again. How-To-Repeat: On my system (following instructions in INSTALL-SOURCE), DL 3.23.37 source and extract in /usr/local. From mysql-3.23.37/ run configure with: ./configure --with-pthread --with-named-curses-libs='' --with-named-thread-libs='' --prefix=/usr/local/mysql configure completes without hitch. Next, compile with: make -i compile completes without hitch. Then I 'make install', 'scripts/mysql_install_db' and the rest. I start testing the installation but I can't stop the daemon! I can only kill it with 'kill -9' but then it restarts again immediately. Fix: Submitter-Id: Originator:System Administrator Organization: MySQL support: none Synopsis: Cannot shutdown daemon on OS X 10.0.2 Severity: serious Priority: medium Category: mysql Class: sw-bug Release: mysql-3.23.37 (Source distribution) Environment: System: Darwin localhost 1.3.2 Darwin Kernel Version 1.3.2: Fri Apr 27 22:50:58 PDT 2001; root:xnu/xnu-124.7.obj~1/RELEASE_PPC Power Macintosh powerpc Some paths: /usr/bin/perl /usr/bin/make /usr/bin/cc Compilation info: CC='cc' CFLAGS='' CXX='c++' CXXFLAGS='' LDFLAGS='' LIBC: lrwxr-xr-x 1 root wheel 15 May 1 23:49 /usr/lib/libc.dylib - libSystem.dylib Configure command: ./configure --with-pthread --with-named-curses-libs= --with-named-thread-libs= --prefix=/usr/local/mysql Thanks, Jim - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail mysql-unsubscribe- [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php