Primary/foreign keys and indexes

2003-07-27 Thread Vikram Vaswani
Hello all, I am working on a book on MySQL, and I need some assistance with deciding where some concepts should be dealt with. 1. I have dealt (briefly) with primary keys and indexes in a chapter called "MySQL DML". I have not discussed foreign keys in this chapter. 2. I would like to discuss f

Re: cant connect to mysql server through socket

2003-07-27 Thread Petre Agenbag
1) make sure mysql is running [and as user mysql] do a ps -aux to see. 2) make sure that the mysql folder and files are owned by mysql (ls -l) On Sun, 2003-07-27 at 10:38, D. K. wrote: > Hi; > I have installed suse 8.2 a short while ago and at my first attempt to connect mysql > (via shell and

Replication Problem

2003-07-27 Thread MaFai
Hello, mysql, 1 master and 1 slave replicated successfully. After I change the master IP address. So the slave can not replicate the master data. Then I type change master to 'new ip'. Show slave status show that an error log found. How can I slove this? Log: mysql> show slave status\G

Re: SQL statement

2003-07-27 Thread Jim McAtee
Either do two queries or suppress the display of customer information within your application code. I'd probably do two queries, especially if asking for a lot of customer info or there were potentially a large number of orders for a given customer. Doing a join in either case gives you a lot of

Re: Indexes to speed up a duplicates query.

2003-07-27 Thread Tom Cunningham
Here's the full query I'm trying to do: explain select users.status, users.oid as oid, users.type as type, users.exclusive as exclusive, userse.o_initials as exclusive_initials, users.name_processed as name_processed, users.o_company as o_company, unix_timestamp(users.created) as c

SQL statement

2003-07-27 Thread Trevor Morrison
HI, I am using the latest MySql on a Windows 2000 platform and connecting to the database using Perl's DBI. All works fine. My question is how best to write a SQL SELECT statement that will extract the data in the format that I want. I have two tables one that contains all the customers informa

Indexes to speed up a duplicates query.

2003-07-27 Thread Tom Cunningham
OK, say you're trying to find all the non-exact duplicates in a table, and especially do it with a single query, so that the check can be part of a user interface. Then naturally you're going to have a slow query, because it has to compare every row with every other row. You ought to be able to

Re: 1040 error, too many connections?

2003-07-27 Thread Nils Valentin
Hi Michael, How many client connections does "mysql> SHOW PROCESSLIST" show you ? Best regards Nils Valentin Tokyo/Japan 2003年 7月 27日 日曜日 22:41、Michael さんは書きました: > I'm running a series of queries from a Python program using the MySQLdb > module. The program opens a connection and then procedes

Depreciated the update log? No!!! Please don't do that.

2003-07-27 Thread Daniel Kasak
http://www.mysql.com/doc/en/News-5.0.x.html The change log says it's "no longer supported". Does that mean that it will be there, but there are no guarantees that it's accurate, or that it's being removed completely? The update log is very handy when doing development work - especially when I

SELECT problem

2003-07-27 Thread Rachel Cunliffe
Hi, I'm new at complex SELECT statements, so any help would be appreciated. I need to create a summary table of counts from two tables in the database: year9 has a stack of variables including sex and favsub (favourite subject) year10 also has a stack of variables including sex and favsub I'd l

do long delete/update and view progress?

2003-07-27 Thread Bennett Haselton
Is there any way to do a long update/delete on a table such that you can view the progress as the command runs, so that long before it's over, you have some idea of what the total running time will be? The way I did it was to write a perl script that takes the total range of values for the prim

Re: importing Access databases

2003-07-27 Thread Jim McAtee
Why does the client doing the importing need to run on Linux? Don't you have access to a Windows machine anywhere on the network? It shouldn't matter where the target MySQL server is or what OS it's running on. - Original Message - From: "Robert Morgan" <[EMAIL PROTECTED]> To: "mysqlli

Re : booting mysql on redhat

2003-07-27 Thread Sanya Shaik
It is looking for the file libexec becoz the libexec contains the location of the mysqld process to start mysql. change the path of the mysqld -- if libexec doesnt exist chances are this file is located in /usr/yourmysqldirectorypath/bin/ __ Do you Yahoo!? The Ne

Re: functions

2003-07-27 Thread colbey
Also keep in mind.. even if for example PHP was faster with certain functions.. Take that time + the time to pull the data from mysql and set it up for manipulation via PHP could be more than asking mysql to do all the work and just return a small resultset.. Just use a simple timer class to writ

Re: cant connect to mysql server through socket

2003-07-27 Thread Sanya Shaik
What version of mysql are you using ? check the location of mysql.sock it probably is in /tmp/mysql/mysql.sock check the sock location in my.cnf --- "D. K." <[EMAIL PROTECTED]> wrote: > Hi; > I have installed suse 8.2 a short while ago and at > my first attempt to connect mysql (via shell a

Re: importing Access databases

2003-07-27 Thread Sanya Shaik
--- Robert Morgan <[EMAIL PROTECTED]> wrote: > Hi, I'm doing a project for a local hospital, they > want to migrate their access databases to mysql on a > Linux box. The hospital runs a Windows network and I > have MYsql running on a linux box connected to the > network. I need to import the Access

Re: functions

2003-07-27 Thread Dan Nelson
In the last episode (Jul 27), Doruk Fisek said: > I am developing applications using PHP and MySQL. > > There are various functions in MySQL that is also implemented in > PHP. Such as date arithmetic, string, numeric, etc... > > Do I get better performance if I do them in MySQL (or PHP) and w

importing Access databases

2003-07-27 Thread Robert Morgan
Hi, I'm doing a project for a local hospital, they want to migrate their access databases to mysql on a Linux box. The hospital runs a Windows network and I have MYsql running on a linux box connected to the network. I need to import the Access .mdb data and structure from the windows server to

mysql@lists.mysql.com

2003-07-27 Thread D. K.
Hi; > I have installed suse 8.2 a short while ago and at my first attempt to connect mysql > (via shell and a perl dbi script) i get following error: > > can't connect to mysql server through socjet '/var/lib/mysql/mysql.sock'. > > i know this looks like a common error and I am terribly sorry

Re: How to export db or table structure?

2003-07-27 Thread Don Read
On 26-Jul-2003 Priscilla Walther wrote: > > We have a very large MySQL database, and the designer of the database no > longer works for us. I need to re-create the same table structure, but > without the content, on a separate machine. > > Is there some kind of export command that will expor

Re: query to find the closest result

2003-07-27 Thread Don Read
On 25-Jul-2003 Brian Newsham wrote: > Hi, > > I'm working on a PHP based website that loads custom pricing for users > where they logon. > > > majver and minver identify which price schedule to use. Each customer has > a different majver minver combination. > > The price schedule where maj

cant connect to mysql server through socket

2003-07-27 Thread D. K.
Hi; I have installed suse 8.2 a short while ago and at my first attempt to connect mysql (via shell and a perl dbi script) i get following error: can't connect to mysql server through socjet '/var/lib/mysql/mysql.sock'. i know this looks like a common error and I am terribly sorry if this kind

Re: MySQL multiple query in php script. (newbie)

2003-07-27 Thread Don Read
On 25-Jul-2003 Barry Hayden wrote: > $sql = "SELECT Realtor, HouseAddress, Bathrooms, Bedrooms, YearBuilt, > Garage, Location, Basement, Info FROM properties > WHERE Bathrooms =='".$a."'", "Bedrooms =='".$b."'", "Garage > =='".$c."'", > "Basement =='".$d."'"; Use '=' ins

Re: Help with DELETE and a subquery

2003-07-27 Thread Don Read
On 25-Jul-2003 Vikram Vaswani wrote: > mysql> SELECT * FROM branches; > +--+-++--+ >| bid | cid | bdesc | bloc | > +--+-++--+ >| 1011 | 101 | Corporate HQ | CA |

Re: Selecting unique values

2003-07-27 Thread Michael Satterwhite
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Friday 25 July 2003 17:38, Alec Smith wrote: > > But what I really need is a result like > > +--++ > > | name | domain | > > +--++ > > | hostdom1 | abc123.com | > | hostdom2 | abc127.com | > | hostdom3

Re: 1040 error, too many connections?

2003-07-27 Thread Martin Gainty
What happens if you keep the original connection open and ALWAYS query with that connection -M - Original Message - From: "Michael" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, July 27, 2003 6:41 AM Subject: 1040 error, too many connections? > I'm running a series of queries

1040 error, too many connections?

2003-07-27 Thread Michael
I'm running a series of queries from a Python program using the MySQLdb module. The program opens a connection and then procedes to make two queries and then close the connection. It does this for each file provided as an argument to the program so there can be quite a few such cycles. I'm gett

Re: mystry about mysqlcc

2003-07-27 Thread Andreas
Hans-Peter Grimm wrote: Looking at the my.ini file for suspicious options, I found that changing the line socket= /tmp/mysql.sock to #socket= /tmp/mysql.sock (commmenting it out) makes mysqlcc work again. Does this help? YES ! Perfectly ! :) Thanks -- MySQL General Mai

Re: [Q] about AUTO_INCREMENT...

2003-07-27 Thread Write a Friend
Thanks, Carlos > > Write a Friend said: > > When using AUTO_INCREMENT, is there a way to set the starting > > value. > > > > Thanks, > > Carlos > Alter Table TABLENAME AUTO_INCREMENT=1 > > where TABLENAME is your table. > > Of course this resets it so the next use of auto increment will generat

Re: mystry about mysqlcc

2003-07-27 Thread Hans-Peter Grimm
Andreas wrote: I got me a copy of mysqlcc 0.9.2-beta and installed it on my win 2000 box. No complaints so far. There is an icon on the desktop. I click it and for a really short moment there is a sandclock and then nothing happens. Mysqlcc just dosn't bother to appear. I went to the c:\programme

Re: A little SQL query help

2003-07-27 Thread Nils Valentin
Hi Mark, Thanks for the reply. Looks like my next step should be to learn PhP ;-) Best regards Nils Valentin Tokyo/Japan 2003年 7月 27日 日曜日 16:35、Obantec Support さんは書きました: > - Original Message - > From: "Nils Valentin" <[EMAIL PROTECTED]> > To: "Obantec Support" <[EMAIL PROTECTED]>; <[EMA

RE: Help with DELETE and a subquery

2003-07-27 Thread Fatt Shin
Try this ... Delete from clients where 0 = (select count(*) from branches where branches.cid = clients.cid) Cheers FattShin -Original Message- From: Vikram Vaswani [mailto:[EMAIL PROTECTED] Sent: Friday, July 25, 2003 9:51 PM To: Nils Valentin; [EMAIL PROTECTED] Subject: Re: Help with

Re: A little SQL query help

2003-07-27 Thread Obantec Support
- Original Message - From: "Nils Valentin" <[EMAIL PROTECTED]> To: "Obantec Support" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, July 27, 2003 2:05 AM Subject: Re: A little SQL query help > Hi Mark, > > 2003年 7月 27日 日曜日 06:09、Obantec Support さんは書きました: > > Hi > > > > I have a da

Re: Re[2]: A little SQL query help

2003-07-27 Thread Nils Valentin
Hi Ivan, depending on mark's needs (orginal poster of the question), you might be right. So far I have not so much experience with PHP. Best regards Nils Valentin Tokyo/Japan 2003年 7月 27日 日曜日 15:43、Ivan Cukic さんは書きました: > Nils> How about LIKE \"$%searchdata%\" ? > > The % sign should be in fr

Re: speeding up lookups on a table

2003-07-27 Thread Bennett Haselton
By the way, I tried adding "high_priority" to the SELECT statement, which according to http://www.mysql.com/doc/en/Internal_locking.html gives it a higher priority, but that didn't fix the problem. This is a desperate, devastating problem that could simply destroy our business if we don't get it