Re: long query status info
I can't read your structures or query from here. [EMAIL PROTECTED] wrote: >hi, > >i'm running a big query across a table containing more than 137 million rows >comparing them to another one with about 4000 rows and i'm wondering how long it will >still take... > >is there a way to see how many operations have been made and how many are left? > >as you can see it already took about 107h: > ># mysqladmin processlist >++--+---+-+-++--+- >| Id | User | Host | db | Command | Time | State| >Info >++--+---+-+-++--+ >| 7 | root | localhost | einzugsbereiche | Query | 387723 | Copying to tmp table | >SELECT > > >- >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: Problems with select
15.8 has no exact binary representation, so a test for equality will fail. Do not use floating point if you want to test for equality. Try DECIMAL Miguel Figueiredo wrote: >Hello all, > >I have a (probably dumb) question. >My table "temperatura" has two fields described bellow. > >mysql> describe temperatura; >+-+--+--+-+-+---+ >| Field| Type | Null | Key | Default | Extra | >+-+--+--+-+-+---+ >| datetime | datetime | YES | | NULL| | >| temperatura | float| YES | | NULL| | >+-+--+--+-+-+---+ >2 rows in set (0.00 sec) > > >When I try to select rows with floats, the result is an empty set. >For example: > >mysql> select datetime,temperatura from temperatura where >datetime="2002-02-08 09:30:00"; >+-+-+ >| datetime| temperatura | >+-+-+ >| 2002-02-08 09:30:00 |15.8 | >+-+-+ >1 row in set (0.00 sec) > >> got one row :) > >mysql>select datetime,temperatura from temperatura where datetime="2002-02-08 >09:30:00" and temperatura=15.8; > >Empty set (0.00 sec) > >--> same thing but with the temperatura value, gives me an empy set :( > >When I try to select another row but the temperatura field has an integer >this is what happens: > >mysql> select datetime,temperatura from temperatura where >datetime="2002-01-25 09:40:00"; >+-+-+ >| datetime| temperatura | >+-+-+ >| 2002-01-25 09:40:00 | 16 | >+-+-+ >1 row in set (0.00 sec) > >---> got one row :) > >mysql> select datetime,temperatura from temperatura where >datetime="2002-01-25 09:40:00" and temperatura=16; >+-+-+ >| datetime| temperatura | >+-+-+ >| 2002-01-25 09:40:00 | 16 | >+-+-+ >1 row in set (0.00 sec) > >--> It works now :/ > >Does anyone have an idea why this happens? How can I select float numbers? > >Best wishes, > >Miguel > - 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: Problems with select
15.8 has no exact binary representation, so a test for equality will fail. Do not use floating point if you want to test for equality. Try DECIMAL Miguel Figueiredo wrote: >Hello all, > >I have a (probably dumb) question. >My table "temperatura" has two fields described bellow. > >mysql> describe temperatura; >+-+--+--+-+-+---+ >| Field| Type | Null | Key | Default | Extra | >+-+--+--+-+-+---+ >| datetime | datetime | YES | | NULL| | >| temperatura | float| YES | | NULL| | >+-+--+--+-+-+---+ >2 rows in set (0.00 sec) > > >When I try to select rows with floats, the result is an empty set. >For example: > >mysql> select datetime,temperatura from temperatura where >datetime="2002-02-08 09:30:00"; >+-+-+ >| datetime| temperatura | >+-+-+ >| 2002-02-08 09:30:00 |15.8 | >+-+-+ >1 row in set (0.00 sec) > >> got one row :) > >mysql>select datetime,temperatura from temperatura where datetime="2002-02-08 >09:30:00" and temperatura=15.8; > >Empty set (0.00 sec) > >--> same thing but with the temperatura value, gives me an empy set :( > >When I try to select another row but the temperatura field has an integer >this is what happens: > >mysql> select datetime,temperatura from temperatura where >datetime="2002-01-25 09:40:00"; >+-+-+ >| datetime| temperatura | >+-+-+ >| 2002-01-25 09:40:00 | 16 | >+-+-+ >1 row in set (0.00 sec) > >---> got one row :) > >mysql> select datetime,temperatura from temperatura where >datetime="2002-01-25 09:40:00" and temperatura=16; >+-+-+ >| datetime| temperatura | >+-+-+ >| 2002-01-25 09:40:00 | 16 | >+-+-+ >1 row in set (0.00 sec) > >--> It works now :/ > >Does anyone have an idea why this happens? How can I select float numbers? > >Best wishes, > >Miguel > - 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: MySQL won't start...
Mysql must own its files and directories. chown -R mysql /var/lib/mysql assumong /var/lib/mysql is the data directory. FISHER,JOE (Non-HP-Roseville,ex1) wrote: >I have 2 SuSE Linux 7.2 machines at home... These boxes have completely >different hardware in each... But the O/S on each, contains virtually all of >the same applications... > >On the first machine, MySQL started right up, and has been working correctly >ever since... > >On the second machine, MySQL will NOT start... > >It tries to start, but keeps aborting... > >Here are the only messages that I can seem to find: > > 020126 18:01:29 mysqld started > 020126 18:01:29 /usr/sbin/mysqld: Table 'mysql.host' doesn't exist > 020126 18:01:29 mysqld ended > 020126 18:04:56 mysqld started > 020126 18:04:57 /usr/sbin/mysqld: Can't find file: >'./mysql/host.frm' (errno: 13) > 020126 18:04:57 mysqld ended > 020126 18:07:31 mysqld started > 020126 18:07:31 /usr/sbin/mysqld: Can't find file: >'./mysql/host.frm' (errno: 13) > >Each time I try to restart, I get the above messages... > >If anyone can point me to some specific log files, that would help to debug >this problem further, I would much appreciate it... > >my.cnf is locate in /etc, as it's supposed to be... > >host.frm exists, but it exists in the following location: (I'm thinking that >something in /usr/sbin/mysqld isn't pointing to the file...) > > /var/lib/mysql/mysql/host.frm > >Is there a configuration file someplace, that I can modify to point to this >host.frm file? > >If so, what is the correct command, including syntax? > >TIA > >Joe F. > > - 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: long query status info
I can't read your structures or query from here. [EMAIL PROTECTED] wrote: >hi, > >i'm running a big query across a table containing more than 137 million rows >comparing them to another one with about 4000 rows and i'm wondering how long it will >still take... > >is there a way to see how many operations have been made and how many are left? > >as you can see it already took about 107h: > ># mysqladmin processlist >++--+---+-+-++--+- >| Id | User | Host | db | Command | Time | State| >Info >++--+---+-+-++--+ >| 7 | root | localhost | einzugsbereiche | Query | 387723 | Copying to tmp table | >SELECT > > >- >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 - 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: sql
perhaps because you are root@eros, and not [EMAIL PROTECTED] root wrote: > Hi > > How do I get off the list ? > > I have tried several times with sending a mail to > mysql-unsubscribe-srabol=mysql-unsubscribe-ing.aguirre=internetica.com.mx@lis >ts.mysql.com, and tried the > http://lists.mysql.com/php/unsubscribe.php link - after submitting my mail > address, i don't get a confirmation code in my mailbox , but... i still >get messages from the list, sql,query > > Edgar > > > - 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: Problem in MySql while inserting '\'
How would you do: set field='Jim said, "that's crazy."' you would have to escape the quote somehow. The '\' is the escaper character. set field='Jim said, "that\'s crazy."' That means hat the escape character must also be escaped. Check the manual for the section on special characters. Most languages that support MySQL also have a function that can [ should] be used to escape all strings before they are inserted or matched in a query. [EMAIL PROTECTED] wrote: > >Hi everybody, > This seems to be a definite defect in MySql. While inserting a String into >a MySql attribute defined as VARCHAR or VARCHAR BINARY, etc., if a '\' is >present in the String, it is simply disregarded, and the remaining part of the >String gets inserted. For inserting a '\', we have to use '\\'. However, the >question remains that why should I give a special treatment to a String >containing '\' ? Normally I am not bothered by the values I insert, as long as >it is a String. I think I should be able to insert any String, irrespective of >its value, into an attribute specified as VARCHAR, without any special >treatment. > What do you say about this, and is there any justification for this kind of >behaviour ? > Thanks and regards, > Jit Roy Chowdhury > Hughes Software Systems > Gurgaon, > India > > > > >"DISCLAIMER: This message is proprietary to Hughes Software Systems Limited >(HSS) and is intended solely for the use of the individual to whom it is >addressed. It may contain privileged or confidential information and should >not be circulated or used for any purpose other than for what it is intended. If >you have received this message in error, please notify the originator >immediately. If you are not the intended recipient, you are notified that you >are strictly prohibited from using, copying, altering, or disclosing the >contents of this message. HSS accepts no responsibility for loss or damage >arising from the use of the information transmitted by this email including >damage from virus." > > > > > > >- >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: mysql.sock problem
check for a .my.cnf file in the user's home directory. It may have conflicting entries. Brad Emerson wrote: > > When I am logged in to my Linux system as root mysqladmin works > correctly. i.e. finds mysql.sock in the correct location. > > When I am logged in as a normal user I get this error: > > Can't connect to local MySQL server through socket > /var/lib/mysql/mysql.sock. blah blah... (This is *not* the correct > mysql.sock) > > > The issue is that my.cnf indicates /var/tmp/mysql.sock for both client > and mysqld. And... it works fine when I am logged in as root. As a > user it's trying to use the wrong mysql.sock file. Any idea how to > fix this? How I achieved the screwed up state? > > BTW, if I use --socket=/var/tmp/mysql.sock it works. I hesitate to > consider it a longtem solution. > > Brad Emerson > > > > > - > 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: Anyone get MySQL and RH7.2 to work?
Install your ncurses rpm. Paul Warren wrote: >I've been frustrated with this for the past I-donno-how-many days. Has >anyone been able to get MySQL to work on Red Hat 7.2? > >I've been getting multiple errors. The First was the resolveIP() right from >the beginning. I follwed what the mysql website said and got glibc version >2.95 and that error dissappeared but I got a new one. >my latest error was can't find "tgetent" in either "curces" or "termcap". I >don't think I have either of the later installed. I don't know where I can >get them. > >I'm using the source code and compiling it. With the RPM, I still get errors >but it has installed somewhat. I'd like a clean install. > >Basically, I would like to know if anyone has got it to install sans errors >and how did they do that. > > >- >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: Can not connect (again)
The client has to be able to search var/lib/mysql and read and write the var/lib/mysql/mysql.socket. It is probably not able to do one of the above due to imprpoer privileges at the filesystem level. Doug Thompson wrote: >Egor: > >Yesterday, I wrote and described that my fix for a single cpu, non-RAID environment >was installing a new version. >What I didn't say at the time is that the mysql.sock file was present exactly where >it was supposed to be and at >exactly the location the error message said it couldn't find it: >var/lib/mysql/mysql.socket. Go figure. > >There is obviously something else going on, but I am ill-equipped to say what it is. >The point I am trying to make, >however, is that the procedures in the manual and all the stock answers are failing >to provide a correction in many >cases. I'm happy to have 3.23.49a functioning and now want to get to work with it. >However, if there are data to be >collected that would be helpful, I suppose I can revert to the RPM that came with >RH7.1 and see if I can re-create the >failure. > >Doug >Bot Bottleneck Botulin - query > >On Thu, 7 Mar 2002 17:18:01 +0200, Egor Egorov wrote: > >>d> Somewhere in setting the permissions and using safe_mysql I messed something >>d> up. I am now getting an Error 2002 can't connect to local Mysql through >>d> socket var/lib/mysql/mysql.socket. I don't know much about the socket file, >>d> so if that has something to do with the problem, I'll need a brief >>d> explanation. Can someone PLEASE HELP because I'm desperate to get this >>d> fixed yesterday. >> > >>If your MySQL server is running then you should check location of >>the socket file and check the socket path in your my.cnf file. >> >>Check your privileges on the socket file and on the dir that >>contains socket file. >> >>You can find the description of this error at: >> http://www.mysql.com/doc/C/a/Can_not_connect_to_server.html >> > > > > > > > >- >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: default value
Michal Dvoracek wrote: >Hello, > >s possible to create table with default value returned by built-in >function ?? >like: > No. > >create table x (a int not null default UNIX_TIMESTAMP()); > What is wrong with the timestamp field type? > > >When inserting new column in table field a will contains timestamp? > >sql,query > >Regards, >Michal Dvoracek [EMAIL PROTECTED] > > >- >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: server startup error
Does mysql own the mysql database directory, and all its files? You should have run it as mysql_install_db --user=mysql Rance Hall wrote: > > Hello all > > I have a slackware 8.0 distro that includes mysql 3.39.x (I'm not at > that computer now, so that could be wrong slighly) install pkg > > I have installed it, and I can get it to run with the > --skip-grant-tables option. > > When I try to run safe_mysqld without the skip option I get the > following error: Table 'mysql.host' doesn't exist > > Now, I ran the mysql_install_db script and it made a bunch of > databases including two called host.xxx > > Question, what is the proper syntax for a creation of the mysql.host > table so that I can create it and get past this error. > > If anyone else has any experience with this, could this be a bug in > the install_db script? > > Thanks for all your help > > Rance > > > _ > Join the world's largest e-mail service with MSN Hotmail. > http://www.hotmail.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
Re: Index only sometimes used
If more than a third of the rows would be selected, it is faster not to use the index. Over 2 million records match the '2'. How many are there total? Steve Gardner wrote: >Hi All > >Could someone explain to me why an index in a select I am doing is only >sometimes used. >The select I do is a complex one with multiple tables, and when it uses the >index it takes 1.5 seconds, but when it dosnt it takes 1 min and 25-50 >seconds. >I have simplified it down and founed the place the problem issee >explains bellow: > >mysql> explain select * from mailstat where domain_id in(1,3,4,7,50,20,11); >+--+---+---+--+-+--++--- >-+ >| table| type | possible_keys | key | key_len | ref | rows | Extra >| >+--+---+---+--+-+--++--- >-+ >| mailstat | range | ind4 | ind4 | 4 | NULL | 239862 | where >used | >+--+---+---+--+-+--++--- >-+ >1 row in set (0.00 sec) >*notice ind4 is used > >mysql> explain select * from mailstat where domain_id in(1,2); >+--+--+---+--+-+--+-+--- >-+ >| table| type | possible_keys | key | key_len | ref | rows| Extra >| >+--+--+---+--+-+--+-+--- >-+ >| mailstat | ALL | ind4 | NULL |NULL | NULL | 2955648 | where >used | >+--+--+---+--+-+--+-+--- >-+ >1 row in set (0.00 sec) >*notice ind4 is NOT used > >mysql> explain select * from mailstat where domain_id in(1); >+--+---+---+--+-+--++--- >-+ >| table| type | possible_keys | key | key_len | ref | rows | Extra >| >+--+---+---+--+-+--++--- >-+ >| mailstat | range | ind4 | ind4 | 4 | NULL | 174922 | where >used | >+--+---+---+--+-+--++--- >-+ >1 row in set (0.00 sec) >*notice ind4 is used > >mysql> explain select * from mailstat where domain_id in(2); >+--+--+---+--+-+--+-+--- >-+ >| table| type | possible_keys | key | key_len | ref | rows| Extra >| >+--+--+---+--+-+--+-+--- >-+ >| mailstat | ALL | ind4 | NULL |NULL | NULL | 2955666 | where >used | >+--+--+---+--+-+--+-+--- >-+ >1 row in set (0.00 sec) >*notice ind4 is NOT used > >Basicaly, when I use '2' in the in() statement (and one or two other values >from hundreds that do work), the index is not used. > >Initialy I thought that maybe the index was corupted, so I built a copy of >the table, and inserted a handfull of rows, but the I got the same results, >except for my new table 1 and 3 didnt work, but 2 did!. > >Out of interest I tried other indexes and found results like: > >mysql> explain select * from mailstat where id<558693; >+--+---+---+-+-+--++ >+ >| table| type | possible_keys | key | key_len | ref | rows | >Extra| >+--+---+---+-+-+--++ >+ >| mailstat | range | PRIMARY | PRIMARY | 4 | NULL | 511375 | >where used | >+--+---+---+-+-+--++ >+ >1 row in set (0.00 sec) >*primary key is used > >mysql> explain select * from mailstat where id<558694; >+--+--+---+--+-+--+-+--- >-+ >| table| type | possible_keys | key | key_len | ref | rows| Extra >| >+--+--+---+--+-+--+-+--- >-+ >| mailstat | ALL | PRIMARY | NULL |NULL | NULL | 2956363 | where >used | >+--+--+---+--+-+--+-+--- >-+ >1 row in set (0.00 sec) >*primary key is NOT used > >If anyone could shed some light on this I would b most greatful :) > >Cheers, Steve > > > >- >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.my
Re: server startup error
The group is not really important, as long as mysql owns the data directory and its contents. You can check /etc/group and see if you have a mysql group, or a group to which mysql is a member. Rance Hall wrote: > Folks: > > I think you are on the right track with that Gerald.. > > I deleted all the files in my data directory (they were just the ones > that mysql_install_db creates) and then ran mysql_install_db --user=mysql > > This time, nothing was created, no files, or anything, cant even find > an error message that would say why. > > So since I know that the server is running under safe_mysqld > --user=mysql it couldnt find the files cause under that account name > apparently they dont exist. > > The mysql user is part of what group, so I can chown the dir, and > start again? > > > Gerald Clark wrote > >> Does mysql own the mysql database directory, and all its files? >> >> You should have run it as >> mysql_install_db --user=mysql >> >> Rance Hall wrote: >> >>> >>> Hello all >>> >>> I have a slackware 8.0 distro that includes mysql 3.39.x (I'm not at >>> that computer now, so that could be wrong slighly) install pkg >>> >>> I have installed it, and I can get it to run with the >>> --skip-grant-tables option. >>> >>> When I try to run safe_mysqld without the skip option I get the >>> following error: Table 'mysql.host' doesn't exist >>> >>> Now, I ran the mysql_install_db script and it made a bunch of >>> databases including two called host.xxx >>> >>> Question, what is the proper syntax for a creation of the mysql.host >>> table so that I can create it and get past this error. >>> >>> If anyone else has any experience with this, could this be a bug in >>> the install_db script? >>> >>> Thanks for all your help >>> >>> Rance >> > > _ > Join the world's largest e-mail service with MSN Hotmail. > http://www.hotmail.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: help with index/query
what about select Url from table where Ref = 'foo' Salada, Duncan wrote: >I am hoping I can get some help with a difficulty I am having with a table >of mine. I am going to give a lot of background info, so please bear with >me. First, let me say that I using 3.23.49. Now some info about the table. >It currently has 5687391 rows. There are 3 columns in the table: ID (int), >Url (varchar(255)), and Ref (varchar(255)). There are two indexes for the >table: one on ID and the other on the first 15 characters of Ref. > >Now my problem: select queries on this table with no joins searching for a >constant in the Refs column only are extremely slow. Here is what all the >sql statements look like "select Url from table where Ref like 'foo'". >Pretty simple right? Here's the deal this table is used only by a little >app that I wrote. Each time the app runs it queries this table as shown >above about 4600 times with different values for "foo". Each query seems to >be taking about 2 minutes to execute. This seems odd to me because I tested >it while I was writing the app and the queries were taking a little over a >second. > - 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: Access denied on use mysql;
Grant all on mysql.* to 'root'@'localhost' identified by "password"; What version MySQL are you running? You need 3.23 for GRANT to work. Kathy Reyes wrote: >I just gave up, everything that I tried did not work. > >I killed mysql and then >started with safe_mysql --skip-grant-tables >then I was able to connect to mysql without an error. >But when I tried to >Grant all on mysql.* to root@localhost identified by "password"; >it gave me the message Unknown Command. > >- Original Message - >From: "alan4100" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Thursday, March 21, 2002 11:07 AM >Subject: Re: Access denied on use mysql; > > >>mysql >> >>Hello Kathy, >> >>How have you made out with access to mysql? >> >> > > > >- >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: Table created on script Err
USE db2; alan4100 wrote: >mysql > >Paul, > >I was afraid to hear that. It had said about line 2 in the error message. >This line #2 looks normal. > >May I ask you to check this script below, but I am afraid it may be >annoying. I will eventually put this on posting. Remember I use Windows XP. > >I would like to know if there is such an mysql "reader" to check syntax >before I run the script. I am using MySQL by Sams in 21 days. > >Alan > > > >== > >CREATE db db2; >USE db db2; >CREATE TABLE Customers (Customer_ID INT NOT NULL >PRIMARY KEY AUTO_INCREMENT, First_Name VARCHAR(20) >NOT NULL,Last_Name VARCHAR(30) NOT NULL, >Address VARCHAR(50), City VARCHAR(20), >State VARCHAR(2), Zip VARCHAR(20), >E_Mail VARCHAR(20), Age INT, Race VARCHAR(20), >Gender ENUM('M','F') DEFAULT 'F', >Eye_Color VARCHAR(10), Hair_Color VARCHAR(10), >Favorite_Activity ENUM('Programming', 'Eating', >'Biking', 'Running', 'None') DEFAULT 'None', >Favorite_Movie VARCHAR(50), Occupation VARCHAR(30), >Smoker Char(0)); > - 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: slow search on INDEX?
None of these selects will use an index. 1. An index can not be used for LIKE '$something'. 2. An index will not be used if 1/3 of the entries match. 3. See #1. Jaime Teng wrote: >Hi, > >I have this table: >mysql> describe eventlog; >+-+--+--+-+-++ >| Field | Type | Null | Key | Default | Extra | >+-+--+--+-+-++ >| id | int(10) unsigned | | PRI | NULL| auto_increment | >| timestamp | int(10) unsigned | | MUL | 0 || >| type| tinyint(4) | | MUL | 0 || >| source | char(10) | | MUL | || >| description | char(100)| | | || >+-+--+--+-+-++ >Currently, this table has 300,000+ entries and 39MB in filesize. > >I made some observations based on the following search: > >1. SELECT * FROM eventlog WHERE > description LIKE "%DENIED%" ORDER BY id DESC LIMIT 20; >2. SELECT * FROM eventlog > WHERE source = 'ERROR' ORDER BY id DESC LIMIT 20; >3. SELECT * FROM eventlog WHERE > SOURCE = 'ERROR' and description LIKE "%DENIED%" > ORDER BY id DESC LIMIT 20; > >Of the 3 queries, #1 gives me the fastest result (<5 secs), and >#2 comes very far second (>10 secs), and #3 comes ALMOST equal >in time with #2. > >I'd like to point out that the pattern '%DENIED%' is only present >when source = 'ERROR'. AND source='ERROR' is about 1/3 of the table's >entry. Furthermore, the pattern '%DENIED%' occurs 1/5 of the time. > >Considering the fact that I do not have any INDEX on description, >the search *description LIKE "%DENIED"* should be very slow as this >will try to apply the search on ALL entries. Likewise, since I have >an INDEX on source, the search source='ERROR' should be fairly fast >at least faster than the first one. YET, I dont get any improvement >and it turned out even a lot slower. > >Why was it this way? > >thanks for your inputs. > >jaime > > >- >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: Parameter passing on shell script
Try: echo " load data infile '/home/loader/txt/file_${date_proc}.txt' into table debits fields terminated by ';' " | mysql -u user -ppass dbname Oswaldo Castro wrote: >Hi List > >I'm new to MySQL and I need help on how to pass shell parameter to a mysql >script file (bash/SuSE 7.2) > >I have one file called run_db_load and I called it from the command line as > ># date_proc=25032002 > ># export date_proc > ># ./run_db_load $date_proc > > > >Inside the run_db_load file I have: > >mysql -u user -ppass dbname < file_to_load.sql > > > >Inside the file_to_load.sql I need to capture the $date_proc variable, so >its content is: > >load data infile '/home/loader/txt/file_${date_proc}.txt into table debits >fields terminated by ';' > > > >The problem is that the ${date_proc} doesn't get substituted and MySQL give >an error. > >Any help will be very appreciated > >Thanks in advance > >Oswaldo Castro > > > > >- >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: mysql.server
All init.d daemons take one of two options. These are "start" and "stop". Init supplies the correct option when changiing run levels. Where the daemon resides varies among versions of UNIX/Linux. [EMAIL PROTECTED] wrote: >>Description: >> >regarding mysql.server daemon > >>How-To-Repeat: >> >I can't seem to find the mysql_daemon_user syntax, per your installation direction >via the web > >>Fix: >> >None > - 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: bug?
Did you dump the 24 records on both boxes and compare them? Maybe someone updated the records on the slave, and now the dates don't match. Vico Timmermans wrote: >I think i stumbled upon a bug that's got something to do with join >size. Detailed information below. > >Using 2 intel-linux platforms with replication the query stated >below works fine on one machine: >- mysql Ver 11.15 Distrib 3.23.37, for pc-linux-gnu (i686) >- Linux deedee 2.2.16-SMP #1 SMP Wed Aug 16 05:07:06 GMT 2000 i686 >unknown >and gives reduced results on the other: >- mysql Ver 11.15 Distrib 3.23.41, for suse-linux (i686) >- Linux blossom 2.4.10-4GB #1 Fri Sep 28 17:20:21 GMT 2001 i686 unknown > >The query states as follows: >SELECT isp.naam AS provider, MID(log.logtijd,1,10) AS datum, >acties.adres AS adres, acties.omschrijving AS adres_omschrijving, >SUM(log.data) AS bytes, SUM(log.duur)/10 AS seconden, >SUM(log.data)*80/SUM(log.duur) AS kbs, COUNT(*) AS aantal, >inbelpunten.id, inbelpunten.plaats, inbelpunten.netwerk FROM log, taken, >deploy , acties , inbelpunten, isp WHERE log.taakID = taken.ID AND >taken.deployID = deploy.ID AND log.actieID = acties.ID AND >taken.inbelpuntid=inbelpunten.id AND inbelpunten.ispid=isp.id AND >log.logtijd >= '2002-03-22' and log.logtijd < DATE_ADD('2002-03-28', >INTERVAL 1 DAY) AND (deploy.keyword = 'STISDN') AND taken.medium='isdn' >AND ((log.meldingid = 10) OR (log.meldingid = 11) OR (log.meldingid = >12)) GROUP BY isp.ID ORDER BY kbs DESC > - 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: Group by?
Maybe you really wanted ORDER BY. Tobias K. Tobiasen wrote: > Hello > > I think the gruop by is behaving strange. Could someone please explain > this or maybe point me to a definition of the group by. (Inspired by > http://www.mysql.org/doc/E/x/Examples.html). > > > CREATE TABLE shop ( > article INT(4) UNSIGNED ZEROFILL DEFAULT '' NOT NULL, > dealer CHAR(20) DEFAULT '' NOT NULL, > price DOUBLE(16,2) DEFAULT '0.00' NOT NULL, > PRIMARY KEY(article, dealer)); > > INSERT INTO shop VALUES > (1,'A',3.45),(1,'B',3.99),(2,'A',10.99),(3,'B',1.45),(3,'C',1.69), > (3,'D',1.25),(4,'D',19.95); > > mysql> SELECT * FROM shop; > > +-++---+ > | article | dealer | price | > +-++---+ > |0001 | A | 3.45 | > |0001 | B | 3.99 | > |0002 | A | 10.99 | > |0003 | B | 1.45 | > |0003 | C | 1.69 | > |0003 | D | 1.25 | > |0004 | D | 19.95 | > +-++---+ > 7 rows in set (0.00 sec) > > mysql> select * from shop GROUP BY article; > +-++---+ > | article | dealer | price | > +-++---+ > |0001 | A | 3.45 | > |0002 | A | 10.99 | > |0003 | B | 1.45 | > |0004 | D | 19.95 | > +-++---+ > 4 rows in set (0.00 sec) > > QUESTION: I had expected 7 rows - where did the rest go? > > > mysql> select * from shop GROUP BY article having price=max(price); > +-++---+ > | article | dealer | price | > +-++---+ > |0002 | A | 10.99 | > |0004 | D | 19.95 | > +-++---+ > 2 rows in set (0.00 sec) > > QUESTION: I had expected 4 rows (one for each article) - where did the > rest go? > > > mysql> select * from shop GROUP BY article having price=min(price); > +-++---+ > | article | dealer | price | > +-++---+ > |0001 | A | 3.45 | > |0002 | A | 10.99 | > |0004 | D | 19.95 | > +-++---+ > 3 rows in set (0.00 sec) > > QUESTION: It seems like group by only return the first row in the > group - is this correct? > > I am not trying to solve a specifik problem - I would just like to > know how the group by works in MySQL. > > T2K > > > > - > 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: Date and Mysql...
Your alias and column name are the same. Which one do you think is being tested? Also DATE is a reserved word. Chuck \"PUP\" Payne wrote: >Hi again... > >When I felt proud because last week I had asked about how to use NOW(), and >get answer that got me working, but now I have a strange problem. It listing >dates, but it not listing like it should, when the web page is create it >going 9, 8, 5, 10 on the dates. Here is the SQL statement I am using... > > >SELECT DATE_FORMAT(DATE, '%M %D, %Y') AS DATE, Title, Links, Summary FROM >news WHERE TO_DAYS(NOW()) - TO_DAYS(DATE) <=5 ORDER BY DATE DESC > >Another problem I am having with another statement. The following statement >should list birthdays that are 7 days out but it not... > >SELECT DATE_FORMAT(DOB, '%M %D, %Y') as DOB, Fname, Lname, Email FROM >emply_info WHERE (TO_DAYS(DOB) - TO_DAYS(NOW())) ><=5 AND (TO_DAYS(DOB) >= TO_DAYS(NOW())) and Tdate is NULL and DOB is not >null ORDER BY DOB, Lname > >Any clue why my SQL statement worked once are now not working? > >Thanks a head of time. > >Chuck Payne >Magi Design and Support > > > >- >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: BUG using left join.
You are passing a string to compare to a date. If you do this, pass it in the string format. Other wise " and t_boxdaily.boxdate < 19990101 " Steve Briant wrote: >Hi, > >I think I may have spotted a bug in connection with the LEFT JOIN statement. > >The following SQL > >select name, sum(repurchasedunits) >from t_fund left join t_boxdaily on t_fund.fundid = t_boxdaily.fundid >where t_fund.fundid = 'BB01' >group by name > >produces the output as below: > >name max(boxdate)sum(repurchasedunits) > - >Marleborough Fund Managers (BB01) 2002-04-12 0 > >(1 row(s) affected) > > >However, a slight change to the join as below: > >select name, sum(repurchasedunits) >from t_fund left join t_boxdaily on t_fund.fundid = t_boxdaily.fundid >where t_fund.fundid = 'BB01' and t_boxdaily.boxdate < '19990101' >group by name > >produces this output: > >name max(boxdate)sum(repurchasedunits) > - > >(0 row(s) affected) > > > >As detailed in the release notes, this join should still give a match as per >the first example shouldn't it ? What is causing it not to is that I have no >records in t_boxdaily that have a boxdate previous to 1st January 1999. > >I am running MySQL version 3.23.37 under Windows 2000. > >Regards > >Steve Briant. > > > >- >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: ENUM Default values on NULL
Steve Katen wrote: > Ruben, > > If you leave it as NOT NULL it should default to NO. "If an ENUM is > declared NOT NULL, the default value is the first element of the list > of allowed values." > > SIDE QUESTION: > Are you doing something like: select * from table where enum_colum="NO" > > If you are running that type of query it won't work because enum does > not store the values you put in. it stores an index. It most certainly will work. > > > if you create the table with enum("NO","YES") then you should be able > to do a select * from table where enum_column=1 > > that should return everything with a NO value. > > Go read the documentation and see what it has to say: > http://www.mysql.com/documentation/mysql/full/manual_toc.html#ENUM > > katen > > At 12:24 PM 4/12/2002 -0400, Ruben I Safir wrote: > >> sql >> >> > > ENUM can handle your needs. you should be able to just change >> your syntax >> > > to: FIELD ENUM('NO','YES') NULL >> > > >> > > under that syntax your default value will be NULL. >> > > >> > I need it to default to 'NO' not NULL > > > > > - > 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: cron job help running mysql/php script
crontab -l will list your current crontab entry. Cron is not running your job from a browser. If it won't run from your unix $ prompt, it won't run from cron. Harpreet Kaur wrote: > I am trying different options but everytime i make a change and type > crontab mycron.txt in telnet it comes to the next promp without an > error message. But it doesnot do what i want it to do. How can i even > test if the cron tab is finding the file. Like the php file runs fine > when run from a browser. But nothing is happening no matter what i > cange in mycron.txt file. > > Help is appreciated . please refer me to a tutorial where i can start > form scratch as this is my first cron job. > > my mycron.txt file has the following one single line. > * * * * * /home/harpreet/crontest.php > > I have the crontest.php file and the mycron.txt file > under/home/harpreet folder. > > Thanks, > > Regards, > Harpreet Kaur > > > > >> From: "Steven Deaton" <[EMAIL PROTECTED]> >> To: "Harpreet Kaur" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>, >> <[EMAIL PROTECTED]> >> Subject: Re: cron job help running mysql/php script >> Date: Fri, 12 Apr 2002 14:06:56 -0700 >> >> You might try a lynx --dump ?? >> >> ---Steven Deaton >> >> - Original Message - >> From: Harpreet Kaur <[EMAIL PROTECTED]> >> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> >> Sent: Friday, April 12, 2002 1:52 PM >> Subject: cron job help running mysql/php script >> >> >> > I wrote my first cron job to run a php script once every minute. >> > >> > The command i wrote is as follows: >> > * * * * * * lynx http://domain ip address/scripts/crontest.php >> > >> > It doesnt seem to work as i tell it to populate the log table in the >> > database. It runs fine when run through the browser. >> > >> > Where am i going wrong? I saved the above line in a text file and >> put in >> my >> > home directory. >> > >> > Please help. >> > >> > Regards, >> > Harpreet >> > mysql cron help >> > >> > >> > >> > _ >> > Send and receive Hotmail on your mobile device: http://mobile.msn.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 >> > > > > > _ > Join the world's largest e-mail service with MSN Hotmail. > http://www.hotmail.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
Re: remote
The only way I can see to get this message is if the client you are on when running mysql is 192.168.10.2 You should be using the IP address of the server you are connecting to, not the IP address of the client machine. George Pitcher wrote: >Toni, > >check your logs to make sure that the client is >logging in with the ip address rather than a >pseudo-address such as pc10-2.domain.com. > >I had this problem when one of my users was logging >in. If that's the case, make sure that the logged-in >name is the one in the MySQL db. > >HTH > >George > --- Toni <[EMAIL PROTECTED]> wrote: > dear all, > >>i have installed mysql on redhat 7.2 and it's work >>well. then i try to open >>mysql client through another computer running win98 >>using this command: >> >>mysql -h 192.168.10.2 -u root >> >>and i get this as the result : >> >>ERROR 1130: Host '192.168.10.2' is not allowed to >>connect to this MySQL >>server >> >>would you please give me an explanation to solve >>this problem? i believe the >>problem is in the networking. >> >>regard >> >>toni >> >> >> >> >- > >>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 >> >> > >= >George Pitcher > >Technical Manager, HERON, Napier University, Edinburgh >0131-455 2435 .. [EMAIL PROTECTED] .. [EMAIL PROTECTED] > >__ >Do You Yahoo!? >Everything you'll ever need on one web page >from News and Sport to Email and Music Charts >http://uk.my.yahoo.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
Re: Strange behaviour with SQL vars and order by
I see no column named Site.nome showing that it is wrong. ds wrote: >Hi, > >I'm having a strange problem using SQL vars (@variable) and an order by >expression. > >I have a query that returns a record for each day. >Each record has a date (data), a column with the daily total value >(uv_views) and other with the accumulated value until the current day >(acc_views). The other columns are IDs. > >The problem is that if i only order by date, the results are ok... >If i order by "date,Site.nome" (you would say Site.name) >the results are wrong and i don't know where it got those results. > >Here is the output. >I have limited the values to 4 (it only returns rows with 0 but it >doesn't matter). >In the second "big" (not so big) query, look at "acc_views" accumulated >value... How can it be ?!?! >Thank you in advance for trying to help. > > >mysql> select @diario_views:=0,@acc_views:=0; >+--+---+ >| @diario_views:=0 | @acc_views:=0 | >+--+---+ >|0 | 0 | >+--+---+ >1 row in set (0.00 sec) > >mysql> SELECT data, > @diario_views:=uv_views as views, > @acc_views:=@acc_views+@diario_views as acc_views, > secloc.site_id,secloc.section_id,secloc.location_id >FROM secloc,Site,Section,Location >WHERE secloc.campaign_id='9' > and secloc.site_id=Site.site_id > and secloc.section_id=Section.section_id > and secloc.location_id=Location.location_id >ORDER BY data LIMIT 4; >++---+---+-++-+ >| data | views | acc_views | site_id | section_id | location_id | >++---+---+-++-+ >| 2001-09-20 | 0 | 0 | 2 | 1 | 4 | >| 2001-09-20 | 0 | 0 | 3 | 1 | 4 | >| 2001-09-20 | 0 | 0 | 4 | 1 | 4 | >| 2001-09-20 | 0 | 0 | 6 | 1 | 4 | >++---+---+-++-+ >4 rows in set (0.02 sec) > >mysql> select @diario_views:=0,@acc_views:=0; >+--+---+ >| @diario_views:=0 | @acc_views:=0 | >+--+---+ >|0 | 0 | >+--+---+ >1 row in set (0.00 sec) > >mysql> SELECT data, > @diario_views:=uv_views as views, > @acc_views:=@acc_views+@diario_views as acc_views, > secloc.site_id,secloc.section_id,secloc.location_id >FROM secloc,Site,Section,Location >WHERE secloc.campaign_id='9' > and secloc.site_id=Site.site_id > and secloc.section_id=Section.section_id > and secloc.location_id=Location.location_id >ORDER BY data,Site.nome LIMIT 4; >++---+---+-++-+ >| data | views | acc_views | site_id | section_id | location_id | >++---+---+-++-+ >| 2001-09-20 | 0 |227815 | 3 | 1 | 4 | >| 2001-09-20 | 0 |263822 | 4 | 1 | 4 | >| 2001-09-20 | 0 | 0 | 2 | 1 | 4 | >| 2001-09-20 | 0 |331278 | 6 | 1 | 4 | >++---+---+-++-+ >4 rows in set (0.04 sec) > >mysql> > - 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: insert for datatype of "set"
insert into mytable ( id , myset) values ('1', 'GA,SC') , ( '2', 'TN,NC,AL') ; Jim Philips wrote: >Yes. I found that page earlier. I still don't see how it answers my question. >What is the proper syntax for an insert statement? > >On Tuesday 23 April 2002 03:54 pm, Christopher Thompson wrote: > >>http://www.mysql.com/doc/S/E/SET.html >> >>On Tuesday 23 April 2002 1:45 pm, Jim Philips wrote: >> >>>I couldn't find this in the documentation. What is the propoer sql to >>>insert into a field with a data type of set? My field has the following >>>set of acceptable values: >>> >>>GA, TN, SC, NC, AL >>> >>>Assume I am inserting multiple values, such GA, TN, SC. If I separate >>>them with commas, mysql will assume they are separate fields. So, what is >>>the way out of this? >>> >>>- >>>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 >> > > >- >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: last_insert_id() query
Don't include a from clause with the last_insert_id(), or you will get a full table scan. The last_insert_id will only give you the insert id for the last record inserted. mysql mailing list user wrote: > Hi, > I have a big problem with last_insert_id() query. > I am adding records to a table with about half a million records in > it. The > insert takes well under a second. I then call last_insert_id as I need to > make a link to another table. > The last_insert_id takes around 2 minutes!!! Yes *minutes*! > Has anybody any idea what might be going wrong here. The auto increment > field is definitely a primary key and any other searches on the table are > quite quick. > Cheers > - > 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: OSX Mysqladmin and Cron
Don't put quotes around your password. Dion Wickander wrote: >I set up a script to rotate my logs for mysql and cron fires it off >perfectly the logs are rotated but when the shell script gets to the last >line which is... > >mysqladmin -u usernam -p"Password" flush-logs > >it will not execute it - my file that logs the execution of the cron script >says it doesn't recognize the command mysqladmin > >any ideas??? > >- >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: how to get support help?
This is a mail list for MySQL users. If a user knows the answer to your problem, and feels like answering, you may get a correct, or incorrect answer. If you REQUIRE quick response, pony up for a service contract like I did. Clay Loveless wrote: >At this point, I'd like to solicit tips on how I might get my support >related concern addressed. It seems like people panicking over things that >are actually documented get help quickly on this list, but when issues come >up that are NOT documented (as I've raised twice below), the issues are >ignored. > >So, rather than an actual answer, I'm now seeking suggestions on how the >hell to GET an actual answer. > > >Those of you who get responses to your questions, please share ... What's >your secret? > >-Clay > >___ >Clay Loveless >Webmaster, Crawlspace >http://www.crawlspace.com/ > > > >-- Forwarded Message >From: Clay Loveless <[EMAIL PROTECTED]> >Date: Tue, 23 Apr 2002 13:12:15 -0700 >To: <[EMAIL PROTECTED]> >Subject: Re: Intermittent 1049 error in MySQL 3.23.49 > >Hello again, > >I've now been on the list long enough to determine it's not an inactive list >... So, I'm hoping that means that someone (perhaps one of the MySQL team >I've seen active on the list today) may be able to address this problem, as >it is quite a serious one. > >Is there a reason that it's not even covered in the documentation? > >I'd love to hear something back ... While I've been a MySQL user for many >years, I'm feeling the urge to spend the time I'm spending waiting to hear >something looking for a more stable and reliable database to run on Mac OS X >Server. > >-Clay > >PS -- I'm running MySQL 3.23.49, but have experienced this problem in other >MySQL versions on Mac OS X Server. > >___ >Clay Loveless >Webmaster, Crawlspace >http://www.crawlspace.com/ > > > >>From: Clay Loveless <[EMAIL PROTECTED]> >>Date: Fri, 19 Apr 2002 17:26:25 -0700 >>To: <[EMAIL PROTECTED]> >>Subject: Intermittent 1049 error >> >>Hello, >> >>I'm running a relatively busy MySQL server on Mac OS X Server 10.1.4. MySQL >> >runs on > >>a dedicated dual G4 500, with 1.5 GB of RAM and an 18GB 15k rpm Ultra160 >>Cheetah drive. No other services besides MySQL run on this machine. >> >>Roughly 3-5 times per day, my MySQL server suddenly "forgets" most or all of >>its databases, and begins claiming that they don't exist with an error 1049. >> >>I've searched the mailing list (found 3 messages with 1049 in the archives, >>none of which described this problem), the online docs (error 1049 isn't >>even mentioned), and Google (which found 150+ pages who are apparently >>having this same problem, but found no answers) ... >> >>I can't believe I'm the only one having this problem, but since there's no >>mention of it anywhere that I can find, I am beginning to wonder. >> >>Can anyone shed some light on this issue, and hopefully, offer a remedy? >> >>Thanks in advance. >> >>-Clay >> >>( >> >>Further info -- the server hosts only about 15-20 databases, the total size >>of which is less than 1.5 GB. Well under 2MM records total. >> >>mysqladmin status as of this writing: >>Uptime: 205602 Threads: 145 Questions: 4293056 Slow queries: 0 Opens: >>207 Flush tables: 1 Open tables: 202 Queries per second avg: 20.880 >> >>) >> >>___ >>Clay Loveless >>Webmaster, Crawlspace >>http://www.crawlspace.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 > > >-- End of Forwarded Message > > >- >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/unsubscr
Re: mysql_real_query and escaping a semicolon
The semicolon does not belong there. Anna Fowles-Winkler wrote: >Anna Fowles-Winkler wrote: > >>Paul DuBois wrote: >> Paul DuBois wrote: > At 14:37 -0600 4/26/02, Anna Fowles-Winkler wrote: > >Well, the function is called like this: > > > >mysql_real_query( mysql_connection, query_string, strlen( query_string )); > > > >Wouldn't that pass the correct length? > > Not necessarily. > Uhm... why not? Wouldn't strlen return the length of the string, ie, the number of characters, and wouldn't that be the length in bytes? --Anna >>>Because mysql_real_query() allows the possibility that the query >>>string contains binary data (including null bytes), in which case >>>strlen() won't necessarily be correct. >>> >>>*IF* the query string doesn't have anything like that in it, >>>then your call should work. I just find it hard to believe that >>>a semicolon would cause any problem. >>> >>The query string doesn't have anything binary, and the call doesn't work. I get a >>syntax error right before the semicolon. >> >>This is my query string: >>INSERT INTO micromodels >> (name, revision, dynamic, m_class, novars, equation, min_0, min_1, >> min_2, min_3, min_4, min_5, min_6, min_7, min_8, max_0, max_1, >> max_2, max_3, max_4, max_5, max_6, max_7, max_8, except_0, >> except_1, except_2, except_3, except_4, except_5, except_6, >> except_7, except_8, prompt_0, prompt_1, prompt_2, prompt_3, prompt_4, >> prompt_5, prompt_6, prompt_7, prompt_8, allow_0, allow_1, allow_2, >> allow_3, allow_4, allow_5, allow_6) >> VALUES ('Eye Movement >>Time',1,NULL,'per',0,'.1;',0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,0,0,1); >> >>And I get this error: >> >>You have an error in your SQL syntax near ' '1.' at line 10 >> >>Kind of weird. I tried upping the strlen by 1, and that didn't work either. >> >>Thanks for any suggestions, >>Anna >> > >To make it more interesting, I can submit the query into MySQL either thru the >command line monitor or thru a -e mysql command line call (mysql -uuser >-ppassword -e "query"), and it works fine! > >--Anna > > >- >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: compilation problem
kapil nakra wrote: > I am facing problem in compiling c++ program using mysql libraries. I > am doing this for the first time. I would appreciate if anyone of you > help me out. > > thanks. > > > folowing is the code > ___ > #include > #include > #include > #include > #include > > int main(void) > { >MYSQL mysql; >assert(mysql_init(&mysql) != NULL); > } > > following is the command i am using to compling > > #gcc connect.c -o mysql_capi.cgi -I/usr/include/mysql -L/usr/lib/mysql > -lmysqlclient -lm #gcc connect.c -o mysql_capi.cgi -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient -lm -lz Make sure you have zlib installed. > > > > following is the output i am getting > > > /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function > `my_uncompress': > my_compress.o(.text+0xaa): undefined reference to `uncompress' > /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function > `my_compress_alloc': > my_compress.o(.text+0x13c): undefined reference to `compress' > collect2: ld returned 1 exit status > > > _ > Send and receive Hotmail on your mobile device: http://mobile.msn.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
Re: lost root password trouble
Nick Wilson wrote: >-BEGIN PGP SIGNED MESSAGE- >Hash: SHA1 > > >* and then James Carrier declared > >>It'll be something like: >> >>/usr/bin/safe_mysqld --defaults-file=/etc/my.cnf --skip-grant-tables >> > >Well, that's certainly progress of sorts :-) >It's just 'hanging' now. It says 'starting mysqld daemon with databases >from /var/lib/mysql' and just hangs > It just wrote that message over the command prompt. It is not hung. Just hit enter. - 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: mysql log rotate
Opening a file access it by its inode. Once it is opened, it can be renamed, or deleted, and this will have no effect for the process that has it open. Flush logs will close the inode, and create a new log, which will assign a new inode to be opened. File names are just handy pointers to inodes. An inode may have many or no names associated with it. StƩphane HENRY wrote: >in mysql docs, http://www.mysql.com/doc/L/o/Log_file_maintenance.html : > >1) shell> cd mysql-data-directory >2) shell> mv mysql.log mysql.old >3) shell> mysqladmin flush-logs > >What's happening if there is a query between line 2 and 3, is it logged ? >How could I rotate my files without a query not logged and without stopping >the server ? > >Thanks for help > > >- >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: Using MyODBC with Python
Python has its own MySQL interface module. You don't need MyODBC. Sabine Richter wrote: >Hello, > >I can't think straight today. So please help me: >I downloaded and installed myODBC 3.51. As far as I understand, it is >only the driver, which provides the connection to the database. In my >example, it is MySQL 3.23.49. >The manual says that in my application I have to allocate the >environment handle, set the version, allocate the connection handle, >conect to the server etc.. But don't I have to have a library / module >which provides functions which I can use to do all that? But where is >it? Or do I have to write all that by myself? I don't know where to >begin. >Please, may anybody help me understand the architecture and how to use >myODBC with Python? Perhaps anybody has a code snippet for me? >I have to be productive with that till tomorrow morning. So it is urgent >for me. > >Thanks a lot for your help. > >Sabine > >- >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: Error repairing: how do you Recreate an Index?
Error 13 is a permission problem. Mysql does not own the file. You probably repaired it while logged on as root, and changed ownership of the file. Make sure it is owned by mysql. MySQL wrote: >Hi all, > >I was trying to repair a table with myisamchk and got the following message: > >"error: 'x.MYD' doesn't have a correct index definition. You need to recreate it >before >you can do a repair" > >(If I try to access the table from mysql, it tells me that the file x.MYD doesn't >exist. > It does exist! It's there! And it was working fine until I tried doing an extended >repair on it using ) > >Attempted: mysqlcheck -r on the database but when it gets to the x.MYD file, it >tells me: >error: File '/.../x.MYD' not found (Errcode: 13) > >I swear the file is there, where it's looking for it. > >Any suggestions? > >Paul Fabris > > >- >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: Problem with SELECT
Unfortunately, you did not tell us what version you are running, or what platform you are running it on. Try rebuilding the indexes with myisamchk or whatever is appropriate for your table type. Sheni R. Meledath wrote: > Hello: > > I have a problem while selecting the records from a table. This table > has got 15494 records. But when selecting its displaying only 1745 > records. > > ### > $result=mysql_query("SELECT COUNT(*) as numrows FROM $table2"); > $row=mysql_fetch_array($result); > $num_rows2 = $row[numrows]; > echo $num_rows2; > =15494 > > $result=mysql_query("select * from $table2"); > $num_rows1=mysql_num_rows($result); > echo $num_rows1; > =1745 > > ### > > Using the second command I can't display all the records. > > But using separate select statement I can select & display any record > which is not displayed in the above case. > ### > $result=mysql_query("select * from $table2 where id='15000'"); > $row=mysql_fetch_array($result); > echo $row[name]; > =sheni > ### > > Could you please help me to figure it out. > > Regards > > Sheni R Meledath > [EMAIL PROTECTED] > > > - > 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 > 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 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: ERROR 1036: Table 'xxx' is read-only
They must be owned by the user under which the mysqld runs, or change them to mode 766. Milan Reznicek wrote: >I have a problem with updating MySQL database on linux with mysql >3.23.24-beta-log. I have prepared a database on Win98 SE platform >with 3.23.49a and when i moved to my linux server at school (RedHat >7.0 CZ with MySQL 3.23.24-beta-log) I can't update or insert to table. I >have changed rights to database files with chmod to 744 but this >doesn't take any effect. Can someone help me? > >- >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: RE: error granting rights
It should be 'username'@'localhost' Mark Shade wrote: >Yep... > >I am in as root, so I should have rights to everything. > >Yep, I have confirmed that the dbname is right, but doublechecking it >multiple times. Plus, this happens even on db that I did the same thing to >only a week ago. The * just says "all tables" as I understand it. > >And, that is what I am doing - setting up the user. That is the whole >point. > >A couple of other considerations: > >I have PHPMySQLAdmin running - and it runs just fine. I can do most >anything with it and have no errors. Also, I did this same thing on a >different db just 1 week ago with no errors. This time, I even tried to >scroll back through my commands in mysql at the mysql command prompt and re- >submit the same commands - I get the same error. I have tried it on a >variety of dbs and users, but no success. > >Thanks for all your help, > >Mark > >>[snip] >>mysql> GRANT ALL >> -> ON dbname.* >> -> TO username@localhost >> -> IDENTIFIED BY 'password'; >>[/snip] >> >>A. Do you have GRANT capability as the user that you are logged on as? >>2. Is dbname.* right? Shouldn't it be just dbname? >>III. Is user set up as username@localhost? >> >>Jay >> >> >> >>- >>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 > > - 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: ERRORS
Make sure mysql owns its database files and directories. [EMAIL PROTECTED] wrote: >>Description: >> > I was getting a read-only error on one of my many databases. So, I tried doing >mysqladmin restart and now I'm getting "Can't find file: './Belzon/jobs.frm' (errno: >13). I've tried looking up this error online and tried doing some of the suggestions >(UMASK), but nothing works. PLEASE HELP!! > >>How-To-Repeat: >> > > >>Fix: >> > > >>Submitter-Id: >>Originator: Jeremy Capp >>Organization: >> > > >>MySQL support: [none | licence | email support | extended email support ] >>Synopsis: >>Severity: serious >>Priority: high >>Category: mysql >>Class: >>Release: mysql-3.23.47 (Mandrake Linux MySQL RPM) >> > >>Environment: >> > linux mandrake 8.2 >System: Linux extranet.belzon.com 2.4.18-6mdk #1 Fri Mar 15 02:59:08 CET 2002 i686 >unknown >Architecture: i686 > >Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc >GCC: Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/specs >gcc version 2.96 2731 (Mandrake Linux 8.2 2.96-0.76mdk) >Compilation info: CC='gcc' CFLAGS='-O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro >-march=i586 -ffast-math -fno-strength-reduce -fno-omit-frame-pointer' CXX='g++' >CXXFLAGS='-O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math >-fno-strength-reduce -fno-omit-frame-pointer' LDFLAGS='' >LIBC: >lrwxrwxrwx1 root root 13 May 6 17:56 /lib/libc.so.6 -> >libc-2.2.4.so >-rwxr-xr-x1 root root 1275300 Mar 7 16:45 /lib/libc-2.2.4.so >-rw-r--r--1 root root 27274138 Mar 7 16:21 /usr/lib/libc.a >-rw-r--r--1 root root 178 Mar 7 16:21 /usr/lib/libc.so >Configure command: ./configure --enable-shared --enable-thread-safe-client >--enable-assembler --with-mysqld-user=mysql >--with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/ >--with-extra-charsets=complex --exec-prefix=/usr --libexecdir=/usr/sbin >--sysconfdir=/etc --datadir=/usr/share --localstatedir=/var/lib/mysql >--infodir=/usr/share/info --includedir=/usr/include --mandir=/usr/share/man >--with-berkeley-db --without-innobase '--with-comment=Mandrake Linux MySQL RPM' > > >- >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: [bug] Multiple daily crashes of mysql/innodb
Use gcc 2.95.3 [EMAIL PROTECTED] wrote: >>Description: >> > Our mysql server is crashing multiple times every day. In looking through the >logs, in mentions that we should check our key buffer, but the memory size is well >within our systems ability. Basically, if I don't find out how to prevent this/what >the problem is then my boss won't allow innodb anymore. >Hardware is a quad-Xeon box, and a dual Pentuim III. >2 gb RAM >dedicated mysql server. > >>How-To-Repeat: >> > haven't figured it out yet, it does repeat several times a day > >>Fix: >> > unknown > >>Submitter-Id: >>Originator: >>Organization: >> > > >>MySQL support: none yet >>Synopsis: daily crashing of mysql (usually Innodb) >>Severity: serious >>Priority: high >>Category: mysql/innodb >>Class:sw-bug >>Release: mysql-3.23.49a-max (Official MySQL Binary) >>Server: /opt/mysql/bin/mysqladmin Ver 8.23 Distrib 3.23.49a, for pc-linux-gnu on >i686 >> >Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB >This software comes with ABSOLUTELY NO WARRANTY. This is free software, >and you are welcome to modify and redistribute it under the GPL license > >Server version 3.23.49a-max-log >Protocol version 10 >Connection Localhost via UNIX socket >UNIX socket/tmp/mysql.sock >Uptime:1 hour 1 min 45 sec > >Threads: 73 Questions: 631834 Slow queries: 49 Opens: 3256 Flush tables: 1 Open >tables: 512 Queries per second avg: 170.535 > >>Environment: >> > >System: Linux db4.recruitomatic.com 2.4.9-21.0RSenterprise #1 SMP Fri Jan 25 04:25:45 >CST 2002 i686 unknown >Architecture: i686 > >Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc >GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs >gcc version 2.96 2731 (Red Hat Linux 7.1 2.96-85) >Compilation info: CC='gcc' CFLAGS='-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch >-Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec >-Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro >-O3 -fno-omit-frame-pointer' CXX='gcc' CXXFLAGS='-Wimplicit -Wreturn-type >-Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat >-Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings >-Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy >-Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpro >-O3 -fno-omit-frame-pointer' LDFLAGS='' >LIBC: >lrwxrwxrwx1 root root 13 Apr 22 11:55 /lib/libc.so.6 -> >libc-2.2.4.so >-rwxr-xr-x2 root root 5734740 Apr 2 10:44 /lib/libc-2.2.4.so >-rw-r--r--1 root root 27332668 Apr 2 10:42 /usr/lib/libc.a >-rw-r--r--1 root root 178 Apr 2 10:42 /usr/lib/libc.so >lrwxrwxrwx1 root root 10 Apr 22 11:55 /usr/lib/libc-client.a -> >c-client.a >Configure command: ./configure --prefix=/usr/local/mysql --enable-assembler >--with-extra-charsets=complex --enable-thread-safe-client --with-innodb >--with-berkeley-db --enable-thread-safe-client >--with-other-libc=/usr/local/mysql-glibc '--with-comment=Official MySQL Binary' >--prefix=/usr/local/mysql --with-extra-charset=complex --enable-thread-safe-client >--enable-local-infile --with-server-suffix=-max 'CFLAGS=-Wimplicit -Wreturn-type >-Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat >-Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings >-Wunused -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' 'CXXFLAGS=-Wimplicit >-Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts >-Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare >-Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder >-Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-r! >tti -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' CXX=gcc > > >- >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 asks error 1036 table read only?
Make sure mysql owns the tables and their directorys, and has write privileges to them. I talking about UNIX permissions here, not mysql permissions. Bill Flanagan wrote: >Hi, I recently inherited a Mysql 3.23.46 database, have some old ISAM >tables on which I am unable to do updates or inserts. I get error >message #1036 'Table is read only.' I am able to sign on to the database >through the root, set myself up as a superuser in the user table, and >have been able to set up test tables and make inserts etc. so it doesn't >look like a permissions issue. I thought that converting the tables to >myisam might help but of course I get the same error message. When I >copied one of the smaller tables into a new table I was able to update >it. (as a last resort I could do this on all the tables, but some are >large and it doesn't really address why the problem occurred) Any >suggestions would be very much appreciated. Thanks! > - Bill Flanagan > > >- >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: INSERT INTO not working
Check your indexes. Daniel Lim wrote: >Hi there, >I have MySql version: 3.23.36 running on RedHat 7.1, it has been >working fine for sometimes until a day ago when the INSERT into for new >record appeared to return OK status but upon verifying the record isn't >there? > >This is an example; > >To insert new record: > >mysql> INSERT into userdata SET loginname = >'test3',lastname='test3',firstname='Testing 3',middlename='Three'; >Query OK, 1 row affected (0.00 sec) > >verify inserted record: > >mysql> select loginname,firstname,middlename from userdata where >loginname = "test3" ; >Empty set (0.04 sec) > >mysql> > >Any suggestion is much appreciated. >Thanks in advance > >Regards, >Daniel Lim >UNIX Systems Administartor >NSW Dept. of Public Works >Sydney, Australia >This e-mail message (and attachments) is confidential, and / or >privileged and is intended for the use of the addressee only. If you are >not the intended recipient of this e-mail you must not copy, distribute, >take any action in reliance on it or disclose it to anyone. Any >confidentiality or privilege is not waived or lost by reason of mistaken >delivery to you. DPWS is not responsible for any information not related >to the business of DPWS. If you have received this e-mail in error >please destroy the original and notify the sender > >For information on services offered by DPWS, please visit our website at >www.dpws.nsw.gov.au > > >- >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: Check tables?
Myisamchk returns an exit code. if myisamchk myfile.MYI ; then do something else do something else fi Mark wrote: >Hello, > >Is there a way I can do a "CHECK TABLES" which will return an exit code of >some sort, to use in a shell-script? Looking at the output of a myisamchk is >fun, but I rather have a utility too that will report an error-status that I >can use to decide whether to make a backup/restore, etc. > >Thanks > >- Mark > >P.S. Keeping the bot happy: mysql > > >- >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: Remote admin of MySQL from Win 2K
It is asking for myslq's root password, not the su password. If you have not set it yet, skip the -p option. Todd Cary wrote: >YES! I was missing something: Telnet!! I can log in *BUT* I am unable to >change the MySQL password. > >mysqladmin -h www.myhost.org -u root -p password 'new_password' asks me for the >password and when I use the root password (su password), I get Access Denied. > >Todd > >-- >Todd Cary >Ariste Software >2200 D Street Extension >Petaluma, CA 94952 >707-773-4523 >[EMAIL PROTECTED] > > > >- >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--Easy data loading question
Because mysql needs 'rx' permissions to read and search the directory. 755 should have been sufficient. Menard, Inc. Information Systems wrote: >I figured it out but I'm a bit confused as to why it happened. >I'm running the load as user1. The file resides at /home/user1/data/filename >Permissions: >filename 666 >data 777 >user1 700 > >I had to change permissions on user1 to 777 in order for it to work. If I'm >logged in as that user, why would I have to do that??? > - 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: File created by mysqldump cannot be read into MySQL
Don't use 'more'. It adds characters to the output. Instead: mysql --host=host --user=user --password=pwd < error_repeat.sql Elliot Smith wrote: >Description: >I used mysqldump to create an SQL file containing a dump of all databases on >the server, including all tables and data (using --all-databases). However, >when I tried to restore from this file, the mysql command line tool reported >errors. I guessed that this was due to the --extended-insert option (I was >using --opt); when I turned this off (but kept all of the other --opt >options) the errors disappeared. > >How-To-Repeat: > >I used mysqldump to create a dump of all databases on the server, as >follows: > > mysqldump --host=host --user=user --password=pwd --all-databases >--opt --result-file=backup.sql > >However, the problem can be duplicated by running the following SQL alone >against a MySQL database using the mysql command line tool: > > > >-- MySQL dump 8.21 >-- >-- Host: pathia.bham.ac.ukDatabase: test >- >-- Server version 3.23.49-max > >-- >-- Current Database: test >-- > >CREATE DATABASE /*!32312 IF NOT EXISTS*/ test; > >USE test; > >-- >-- Table structure for table 'up_layout_struct' >-- > >DROP TABLE IF EXISTS up_layout_struct; >CREATE TABLE up_layout_struct ( > USER_ID int(11) NOT NULL default '0', > LAYOUT_ID int(11) NOT NULL default '0', > STRUCT_ID int(11) NOT NULL default '0', > NEXT_STRUCT_ID int(11) default NULL, > CHLD_STRUCT_ID int(11) default NULL, > EXTERNAL_ID int(11) default NULL, > CHAN_ID int(11) default NULL, > NAME varchar(35) default NULL, > TYPE varchar(35) default NULL, > HIDDEN char(1) default NULL, > IMMUTABLE char(1) default NULL, > UNREMOVABLE char(1) default NULL, > PRIMARY KEY (LAYOUT_ID,USER_ID,STRUCT_ID) >) TYPE=MyISAM; > >/*!4 ALTER TABLE up_layout_struct DISABLE KEYS */; > >-- >-- Dumping data for table 'up_layout_struct' >-- > > >LOCK TABLES up_layout_struct WRITE; >INSERT INTO up_layout_struct VALUES (1,1,1,4,2,NULL,NULL,'Header >folder','header',NULL,'Y','Y'),(1,1,2,3,NULL,NULL,10,NULL,NULL,NULL,NULL,NUL >L),(1,1,3,NULL,NULL,NULL,99,NULL,NULL,NULL,NULL,NULL),(1,1,4,9,5,NULL,NULL,' >Main',NULL,NULL,'Y','Y'),(1,1,5,7,6,NULL,NULL,'Column >1',NULL,NULL,NULL,NULL),(1,1,6,NULL,NULL,NULL,5,NULL,NULL,NULL,NULL,'N'),(1, >1,7,NULL,8,NULL,NULL,'Column >2',NULL,NULL,NULL,NULL),(1,1,8,NULL,NULL,NULL,8,NULL,NULL,NULL,NULL,'N'),(1, >1,9,14,10,NULL,NULL,'Misc',NULL,NULL,'Y','Y'),(1,1,10,12,11,NULL,NULL,'Colum >n >1',NULL,NULL,NULL,NULL),(1,1,11,NULL,NULL,NULL,9,NULL,NULL,NULL,NULL,'N'),(1 >,1,12,NULL,13,NULL,NULL,'Column >2',NULL,NULL,NULL,NULL),(1,1,13,NULL,NULL,NULL,11,NULL,NULL,NULL,NULL,'N'),( >1,1,14,22,15,NULL,NULL,'News',NULL,NULL,'Y','Y'),(1,1,15,17,16,NULL,NULL,'Co >lumn >1',NULL,NULL,NULL,NULL),(1,1,16,NULL,NULL,NULL,12,NULL,NULL,NULL,NULL,'N'),( >1,1,17,NULL,18,NULL,NULL,'Column >2',NULL,NULL,NULL,'N'),(1,1,18,19,NULL,NULL,6,NULL,NULL,NULL,NULL,'N'),(1,1, >19,NULL,NULL,NULL,13,NULL,NULL,NULL,NULL,'N'),(1,1,22,25,23,NULL,NULL,'User >Preferences',NULL,'Y','Y','Y'),(1,1,23,24,NULL,NULL,90,NULL,NULL,NULL,NULL,' >Y'),(1,1,24,NULL,NULL,NULL,92,NULL,NULL,NULL,NULL,'Y'),(1,1,25,NULL,26,NULL, >NULL,'Footer >folder','footer',NULL,'Y','Y'),(1,1,26,NULL,NULL,NULL,19,NULL,NULL,NULL,'Y', >'Y'),(2,1,1,4,2,NULL,NULL,'Header >folder','header',NULL,'Y','Y'),(2,1,2,3,NULL,NULL,10,NULL,NULL,NULL,NULL,NUL >L),(2,1,3,NULL,NULL,NULL,99,NULL,NULL,NULL,NULL,NULL),(2,1,4,10,5,NULL,NULL, >'Main',NULL,NULL,NULL,NULL),(2,1,5,8,6,NULL,NULL,'Column >1',NULL,NULL,NULL,NULL),(2,1,6,7,NULL,NULL,11,NULL,NULL,NULL,NULL,NULL),(2,1 >,7,NULL,NULL,NULL,14,NULL,NULL,NULL,NULL,NULL),(2,1,8,NULL,9,NULL,NULL,'Colu >mn >2',NULL,NULL,NULL,NULL),(2,1,9,29,NULL,NULL,3,NULL,NULL,NULL,NULL,NULL),(2,1 >,29,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL),(2,1,10,17,11,NULL,NULL,'Deve >lopment',NULL,NULL,NULL,NULL),(2,1,11,13,12,NULL,NULL,'Column >1',NULL,NULL,NULL,NULL),(2,1,12,18,NULL,NULL,4,NULL,NULL,NULL,NULL,NULL),(2, >1,18,NULL,NULL,NULL,15,NULL,NULL,NULL,NULL,NULL),(2,1,13,NULL,1 >5,NULL,NULL,'Column >2',NULL,NULL,NULL,NULL),(2,1,15,14,NULL,NULL,20,NULL,NULL,NULL,NULL,NULL),(2 >,1,14,16,NULL,NULL,7,NULL,NULL,NULL,NULL,NULL),(2,1,16,37,NULL,NULL,16,NULL, >NULL,NULL,NULL,NULL),(2,1,37,NULL,NULL,NULL,22,NULL,NULL,NULL,NULL,NULL),(2, >1,17,21,19,NULL,NULL,'User >Preferences',NULL,'Y','Y','Y'),(2,1,19,20,NULL,NULL,90,NULL,NULL,NULL,NULL,' >Y'),(2,1,20,NULL,NULL,NULL,92,NULL,NULL,NULL,NULL,'Y'),(2,1,21,27,22,NULL,NU >LL,'CWebProxy Examples',NULL,NULL,NULL,NULL),(2,1,22,25,23,NULL,NULL,'Column >1',NULL,NULL,NULL,NULL),(2,1,23,24,NULL,NULL,17,NULL,NULL,NULL,NULL,NULL),(2 >,1,24,NULL,NULL,NULL,17,NULL,NULL,NULL,NULL,NULL),(2,1,25,NULL,26,NULL,NULL, >'Column >2',NULL,NULL,NULL,NULL),(2,1,26,NULL,NULL,NULL,18,NULL,NULL,NULL,NULL,NULL), >(2,1,27,NULL,28,NULL,NULL,'Footer >folder','footer',NULL,NULL,NULL),(2,1,
Re: Fulltext search - several tables
You will get better response if you post only once, and NOT as a reply to someone else's question. Peter Engstrƶm wrote: >Hello everybody! > >How can I do a fulltext search on several tables >with just one SQL query? > >Best regards >/Peter > > > >- >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: timestamp(8) GROUP BY problem
try timestamp(14) instead. [EMAIL PROTECTED] wrote: >Description: > Problem with timestamp(8) and GROUP BY > >How-To-Repeat: > >mysql> CREATE TABLE test ( >-> id int auto_increment, >-> dd timestamp(8), >-> data int, >-> PRIMARY KEY (id) >-> ); >Query OK, 0 rows affected (0.01 sec) > >mysql> INSERT INTO test (data) VALUES(1),(2),(3),(4); >Query OK, 4 rows affected (0.00 sec) >Records: 4 Duplicates: 0 Warnings: 0 > >mysql> SELECT * FROM test; >++--+--+ >| id | dd | data | >++--+--+ >| 1 | 20020527 |1 | >| 2 | 20020527 |2 | >| 3 | 20020527 |3 | >| 4 | 20020527 |4 | >++--+--+ >4 rows in set (0.00 sec) > >mysql> SELECT dd,count(*) FROM test GROUP BY dd; >+--+--+ >| dd | count(*) | >+--+--+ >| 20020527 |4 | >+--+--+ >1 row in set (0.00 sec) > >mysql> UPDATE test SET dd='2002052701' WHERE id=1; >Query OK, 1 row affected (0.00 sec) >Rows matched: 1 Changed: 1 Warnings: 0 > >mysql> UPDATE test SET dd='2002052702' WHERE id=2; >Query OK, 1 row affected (0.00 sec) >Rows matched: 1 Changed: 1 Warnings: 0 > >mysql> UPDATE test SET dd='2002052703' WHERE id=3; >Query OK, 1 row affected (0.00 sec) >Rows matched: 1 Changed: 1 Warnings: 0 > >mysql> UPDATE test SET dd='2002052704' WHERE id=4; >Query OK, 1 row affected (0.00 sec) >Rows matched: 1 Changed: 1 Warnings: 0 > >mysql> SELECT dd,count(*) FROM test GROUP BY dd; >+--+--+ >| dd | count(*) | >+--+--+ >| 20020527 |1 | >| 20020527 |1 | >| 20020527 |1 | >| 20020527 |1 | >+--+--+ >4 rows in set (0.00 sec) > >Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB >This software comes with ABSOLUTELY NO WARRANTY. This is free software, >and you are welcome to modify and redistribute it under the GPL license > >Server version 3.23.49a-max-log >Protocol version 10 >Connection Localhost via UNIX socket >UNIX socket/tmp/mysql.sock >Uptime:65 days 4 hours 9 min 10 sec > >Threads: 6 Questions: 69973912 Slow queries: 688 Opens: 129933 Flush tables: 3 >Open tables: 506 Queries per second avg: 12.427 > >>Environment: >> > >System: Linux gap 2.4.18 #3 SMP Fri Mar 15 14:40:03 EET 2002 i686 unknown >Architecture: i686 > >Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc >GCC: Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.3/specs >gcc version 2.95.3 20010315 (SuSE) >Compilation info: CC='gcc' CFLAGS='-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch >-Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec >-Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro >-O3 -fno-omit-frame-pointer' CXX='gcc' CXXFLAGS='-Wimplicit -Wreturn-type >-Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat >-Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings >-Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy >-Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpro >-O3 -fno-omit-frame-pointer' LDFLAGS='' >LIBC: >-rwxr-xr-x1 root root 1384040 Dec 18 18:24 /lib/libc.so.6 >-rw-r--r--1 root root 25214756 Dec 18 18:07 /usr/lib/libc.a >-rw-r--r--1 root root 178 Dec 18 18:07 /usr/lib/libc.so >Configure command: ./configure --prefix=/usr/local/mysql --enable-assembler >--with-extra-charsets=complex --enable-thread-safe-client --with-innodb >--with-berkeley-db --enable-thread-safe-client >--with-other-libc=/usr/local/mysql-glibc '--with-comment=Official MySQL Binary' >--prefix=/usr/local/mysql --with-extra-charset=complex --enable-thread-safe-client >--enable-local-infile --with-server-suffix=-max 'CFLAGS=-Wimplicit -Wreturn-type >-Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat >-Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings >-Wunused -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' 'CXXFLAGS=-Wimplicit >-Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts >-Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare >-Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder >-Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-r! > tti -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' CXX=gcc > > >- >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
Re: @INC
You need to install DBI first. Amy Zediak wrote: > >I'm a little confused on how to add things to @Inc path...i'm trying to >install Msql-Mysql-modules and it says that my DBI/DBD is not in the >@INC > >Thanks >Amy > > > - 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: warning: 1 clients is using or hasn't closed the table properly
You should NOT be running myisamchk while the server is running! [EMAIL PROTECTED] wrote: >I get this message when I do a myisamchk on a table right after I use >phpMyAdmin or other mysql client tools. > >What do I need to do to get the table to close properly? I have been >having to run myisamchk -r on the talbe every time I do something to it. > >Thanks in advance, >Chris > > > - 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: Extracting binary data from a row
All the numeric types are returned as strings. If you want to convert them to numbers, you need to use scanf or atod type functions. Michael Flora wrote: > Hello all, this is my first post to this list. I am relatively new to > MySQL, and my question might be a basic one. > > I have a table that contains both character and binary data. I am > reading rows from the table using the function mysql_fetch rows() in a > C program. I can obtain character data all right, but I cannot obtain > the values of binary data stored in the table as type DOUBLE. My code > looks like this: > > double dnum; > . > . > . > row = mysql_fetch_rows(result); > > dnum = *row[1]; /* The data is stored in the 2nd column of the > table */ > > printf("%10.2f",dnum); > > When I execute this I get junk. I know from inspection that there are > good values in the table. What am I doing wrong? > > Thanks for any advice, > Michael Flora > > > > - 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: How to write output of sql stmt to file
Did you check out the -w option to mysqldump? andy wrote: >Hi there, > >I am trying to get only records out of a table mathing a query. This should >be piped into a textfile. My problem is that I have to transmit this records >to a new machine. So the output should be a kind of sql commands which I >could run with phpadmin or similar to import them to the other db on the >other machine. > >Is this possible? > >Thank you for any help, > >andy > > >- >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: still not-empty set
Maybe if (!($result)) { Try print STDERR "RESULT=$result\n"; to see what you are comparing to. Chris Hohimer wrote: > thanks for all the replies!! but it is not working. > here is the loop: > > if($result == EMPTY SET){ > $Scheduled = NULL; > } > else{ > $Tech = mysql_result($result, 0, "tech"); > $SNumber = mysql_result($result, 0, "snumber"); > $Scheduled = mysql_result($result, 0, "scheduled"); > } > > here is what i've tried and the results > #1. > if ($result == NULL){ > > Warning Unable to jump to row 0 on MySQL result index# > in Location-of-file.php line 158 > > #2. > if (is_null($result)){ > > SAME > > #3. > if ($result == 'NULL'){ > > SAME > > #4. > if($result){ > > WORKS but it executes the $Scheduled= NULL code on everything. > even when there are actual results that are not > empty set. > > Any more suggestions? > thanks > > Chris Hohimer > Sandia National Labs > CSU821 ORG9623 > > - 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: Is it possibile to have something similar?
No you can't, but check out LIMIT. Marco Stagno wrote: >>IMHO, The Right Thing to do this, is to create the additional data in >>your application (as you said you won't change the table). >> > >(...) > >thank you! > >>If you want this with SQL for sure, using user-defined variables will >>work: >> > >cool. sorry, but I'm still learning, since I'm into MySQL from a few time >only! > >>mysql> select @a := @a + 1 AS pos, gid from config where gid>30 limit 10; >>+--++ >>| pos | gid| >>+--++ >>|1 | 31 | >>|2 | 32 | >>|3 | 33 | >> > >...can I use the "pos" data in a "WHERE" statment? > >something like.. > >select @a := @a + 1 AS pos, gid from config where pos > 100 and pos <200 ? > >(or there is a better way to have a particular subset of data WITHOUT >HAVING ANY INFO ON THE DB STRUCTURE?! I'm trying to have a tool to paging >the query result in a gui structure) > >>Another approach would be to select the data into a TEMPORARY TABLE. >> > >how can I do that? > >thank you very much again! > >bye bye! > > MAS! > > >- >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: Stupid Q
Are you shure you don't really want ENUM('y','n') SET('y','n') will allow the field to be both 'y' and 'n' at the same time. Chris Knipe wrote: >I'm talking under correction here, but > >SET('y'.'n') default 'n' NOT NULL - should work. I normally just do all >this stuff via phpmyadmin, it works really great... > >-- >me > > >- Original Message - >From: "Jason Soza" <[EMAIL PROTECTED]> >To: "MySQL Mailing List" <[EMAIL PROTECTED]> >Sent: Friday, June 07, 2002 5:06 AM >Subject: Stupid Q > > >>Hoping someone can help me here: >> >>I've made a column using SET("y","n") NOT NULL - I want the default value >> >in > >>that column to be "n", so if no data is entered for that column, it'd be >> >"n" > >>automatically. >> >>How do I do that? Not sure what to search for in the manual. >> >>Jason Soza >> >>filter fodder: sql, query >> - 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: Counting distinct elements
You mean SELECT ObjId,ElemId,count( distinct Objid,ElemId ) from Elems group by ObjId; ? Csaba Gabor wrote: >Seems like this should be an easy question, but I just don't get it: > >If I have CREATE TABLE Elems (ObjId INT, ElemId INT); >Is there a nice query to find the Number of Distinct ElemId's for each ObjId? > >Motivation: Later I will want to add a WHERE ObjId IN (...) and join the Obj >describing table to >the results of this query. > >Thanks, >Csaba Gabor from New York > >__ >Do You Yahoo!? >Yahoo! - Official partner of 2002 FIFA World Cup >http://fifaworldcup.yahoo.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
Re: Permissions for mysqladmin
Cindy Nelson wrote: > Hi, > > I am using SuSE 7.0 and MySQL 4.0.1. I had quite a time > getting the daemon started on Linux but finally succeeded. > I can start the daemon logged on as su and I can connect > to the database as user=mysql and modify the existing DB > called test. > > I set the permissions as recommended in INSTALL-BINARY. > Logged on as "su" I did the following: > chown -R root /usr/local/mysql that should be mysql, not root chown -R mysql:mysql /usr/local/mysql > > chown -R mysql /usr/local/mysql/data not necessary - see above. > > chgrp -R /usr/local/mysql You forgot the group, but not necessary - see above. > > chown -R /usr/root/local/mysql/bin You forgot the user, but this should be ok from the chown -R mysql:mysql /usr/local/mysql above > > > Apparently what should happen is the system administrator should > be able to start and stop the daemon and control the binary files and > anybody in the group that I created "mysql" should be able to manipulate > data in the DBs to which they have permissions. Only the mysqld manipulates the data. > > > Well.. I have a problem when I try to issue the > command to create a new database. try: mysql -u root That should get you in. You need to read the manual section on privileges. You have to set up privileges for other users that want to connect to the server. > > > mysqladmin create > > If I am logged on as root or a user in the group mysql, I get the message > Access denied for @localhost. I tried doing a chmod on > several files > in mysql but to no avail. Also I notice there is no file in etc called > my.cfg as the documentation suggests. It seems that the permissions are > stored in a table in /usr/local/mysql/data/mysql but I cannot get at > the table to > change anything. > > It would seem that there is someway to issue some kind of external > command > that would change the permissions for the superuser and user mysql > without > manipulating that table directly. > > I am really not concerned about security right now. This is a stand > alone Linux > server at my house that is rarely connected to anything. I just want > to practice > my SQL skills. > > Any ideas. > > > ** > Cindy Nelson(404) 213-9498 cell > 202 Jimmie Nelson Rd SW(770) 382-4474 home > Kingston, Ga 30145 > > e-mail: [EMAIL PROTECTED] > > http://home.earthlink.net/~cindynelson > > ** - 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: Unique Indexes across multiple columns
It looks to me like 'a' is '127-30-127-1' Notice the dashes. I don't believe you are splitting the IP address into 4 separate numbers. Chris Knipe wrote: >Hi again, > >Not to long ago, I had a query regarding the best way to store IP addresses >in a DB, and make sure that they are unique. > >It was pointed out to me that I could use four smallint columns instead of a >varchar to store these numbers, and just implement a UNIQUE index across all >four columns to make sure the combination of the four columns, would never >be in duplicate. > >It seems, the UNIQUE index however still insist on having unique values for >all of the four columns... > >The DB looks like this (the four smallint columns): >NS1_IP1 smallint(5) >NS1_IP2 smallint(5) >NS1_IP3 smallint(5) >NS1_IP4 smallint(5) > >SQL-query : >ALTER TABLE `domains` ADD UNIQUE `NS1_Unique` >(`NS1_IP1`,`NS1_IP2`,`NS1_IP3`,`NS1_IP4`) > >MySQL said: >Duplicate entry '127-30-127-1' for key 2 > >Which, tells me that I can have the following: >a, b, c, d - works >b, c, d, e - works >a, b, c, d - fails >a, a, b, b - fails <-- This should however not fail... (the combination is >unique??) > >Any idea on how I can get this working?? > >-- >me > > - 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: Installation problem
Mysql does not own the database and its tables; chown -R mysql /usr/local/mysql/var ( or whatever the database location is. ) Kariuki, JohnX K wrote: >Hi I am pretty new to linux and I was trying to setup and use mysql, I >followed the directions you provided about compiling it and installing it, >but when I try to start the server the mysql daemon fail right away : saying >mysqld ended. I looked at the error log and this is what it says : >/usr/local/mysql/bin/mysqld: Can't find file : './mysql/host.frm' (errno : >13). >Now the file host.frm is in the directory /var/lib/mysql/mysql/host.frm, I >was gonna put this somewhere in the msqld file but it is not in human >readeable form. >Thank you. >John > >- >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: Unable to connect to remote mysql server.
1. What does this have to do with ssh? 2. Does root@yourmachine have permission to connect to mysqld on 202.157.188.2? ally wrote: > Dear all, > >I hv mysql server running on a remote machine(ip 202.157.188.2) and i'm >trying to connect to it by ssh from another machine(ip 202.157.137.97) as >follows : > >$ mysql -h 202.157.188.2 -u root -p >Enter password: >ERROR 2003: Can't connect to MySQL server on '202.157.188.2' (61) > >Can you please advice. > >thank you very much, >ally > > >- >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: Database renaming?
Any permissions set for users on the database will be invalid. Martin Rode wrote: >Hi there, > >I was wondering if I can rename a MySQL instance (MyISAM) by simple >stopping the server and rename the data directory? A quick test did not >show any problems. I am now wondering if I can get other problems which >I have not encountered so far. > >Please reply to my mail, I'm no subscriber to the list. > >Thanx for your help, > >;Martin > > > > > - 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: mysql auto_increment question
Taylor Lewick wrote: >Hi all. I have searched the documentation, and i found some info, but I wanted to ask >the lsit a little more about auto_increment. > >First, if I use auto_increment, and then delete a field, I assume mysql leaves the >remaining fields with the original numbers... >i.e. if I haverows 1 through 10 and delete row 1, the other rows are still 2-9. Is >this correct. > Yes. > If I want to insert something with a value of 1, is that easy to do? > You would have to supply the id in the insert statement. Why would you want to? > >What if I decide to reorganize the rows. Must I drop them and repopulate, or can I >just shuffle them to the order I want? > There is no organization to the rows unless your query has an ORDER clause. > >Finally, do most of you findauto-increment to be pretty useful or more restrictive, >or both, useful but restrictive? > Very useful. Every table I generate has a _rec and a _timestamp column. I just leave them alone. I use the _rec to specify a single record to update, and prove to my clients when they did something they claim they didn't do by showing them the _timestamp. - 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: Errno 13 on starting mysqld (Suse 8)
MySQL doesn't own the files. chown -R mysql /var/lib/mysql eh wrote: >Errno 13 on starting mysqld > >I am using SUSE 8.0 >on a 586 computer >I installed MYSQL 3.23.48 from the Suse-CD (By the while four times) > >At first I was running (as described in >/usr/share/doc/packages/mysql/README.Suse ) >"rcmysql start" as root from /var/lib/mysql/ (and later from /usr/bin/) > >Console messages were: > Starting mysqld daemon with databases from /var/lib/mysql > mysql ended > > >contents of /var/lib/mysql.log were > > 020605 13:07:02 mysqld started > 020605 13:07:02 /usr/sbin/mysqld: Can't find file: './mysql/host.frm' > (errno: 13) > 020605 13:07:02 mysqld ended > - 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: not able to edit table:((
The mysql user was not granted write permission on the database? Anil Garg wrote: >The persmissions seems to be ok. >ne other ideas!! >- Original Message - >From: "Kiss DƔniel" <[EMAIL PROTECTED]> >To: "Anil Garg" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> >Sent: Tuesday, June 11, 2002 12:59 PM >Subject: Re: not able to edit table:(( > > >>Greetings, >> >>Stop the MySQL server and check the table files. >>I think they are read only if you use Win32, or under Linux the user >>'mysql' does not have the write right to the tables or its directories >> >>In the last case: >>chmod 660 * >> and/or >>chown mysql:mysql * >> >>At 12:39 2002.06.11. -0400, you wrote: >> >>>Hi, >>>I am not able to edit a table: >>>the sql queries i tried are follows: >>> delete form documents where id = 134;gives the following error: >>>error: table documents is read only >>> >>>repair doesnt seem to work >>>repair table documents; >>>Table Op Mst_typeMsg_text >>>mydb.documentsrepair error"the 'documents' is read only >>> >>>Can someone help me >>>thanx >>>anil >>> >>> - 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: easy question
chad kellerman wrote: >Hello, > I am sure this is an easy question but I am not thinking clearly for some >reason. :^) > > If you set a column to auto_Increment. You do not have to put the >auto_increment # in the insert statement to get it to be inserted. Mysql >does this automatically. > > Is there a way to have the timestamp automatically inserted when an >insert statement is run? The timestamp of the insert statement. > >thanks for the help, >chad > > That is what the timestamp type is for. Please read the manual. - 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: Any way to make a "top ten" query?
ORDER BY mountainheight DESC LIMIT10 Yrjƶ MƤenpƤƤ wrote: >As there is no TOP operator nor nested selects in MySQL, I wonder if there >still exists some clever way to make"top ten" type of a query , i.e. to >select ten best selling products or ten highest mountains for example. > >thanks > > > - 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: Why does Key==Mul in DESCRIBE TABLE for unique key?
CREATE TABLE X (FLD1 INT PRIMARY KEY); or CREATE TABLE X (FLD1 INT, UNIQUE(FLD1)); UNIQUE applies to an index, not a field. Andy Sy wrote: >- Original Message - >From: "Paul DuBois" <[EMAIL PROTECTED]> >To: "Andy Sy" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> >Sent: Friday, June 14, 2002 2:45 AM >Subject: Re: Why does Key==Mul in DESCRIBE TABLE for unique key? > > >>At 2:03 +0800 6/14/02, Andy Sy wrote: >> >>>mysql> CREATE TABLE X (FLD1 INT UNIQUE); >>>Query OK, 0 rows affected (0.05 sec) >>> >>>mysql> DESCRIBE X; >>>+---+-+--+-+-+---+ >>>| Field | Type| Null | Key | Default | Extra | >>>+---+-+--+-+-+---+ >>>| FLD1 | int(11) | YES | MUL | NULL| | >>>+---+-+--+-+-+---+ >>> >>>Doesn't MUL mean a key can exist multiple times >>>in the index? >>> >>Right. It means it's part of a non-unique index. >> > >But I declared the field as UNIQUE (see the CREATE >TABLE statement). > > > >- >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: Nulls and unique indexes.
That is correct. Use NOT NULL in the definition to force unique keys. [EMAIL PROTECTED] wrote: >>Description: >> > If a null column is used in a unique index then mysql fails to throw a > key violation when multiple identical inserts (with nulls) are > performed. > >>How-To-Repeat: >> > create table test (a int null, b int null); > alter table test add unique index index_ab (a,b); > insert into test (a,b) values(1,null); > insert into test (a,b) values(1,null); > insert into test (a,b) values(1,null); > select * from test; > +--+--+ > | a| b| > +--+--+ > |1 | NULL | > |1 | NULL | > |1 | NULL | > +--+--+ > 3 rows in set (0.00 sec) > > insert into test (a,b) values(1,1); > insert into test (a,b) values(1,1); > ERROR 1062: Duplicate entry '1-1' for key 1 > >>Fix: >> > No fix. > >>Submitter-Id: >>Originator: Jon Barker >>Organization: >> > > >>MySQL support: none >>Synopsis: NULLs don't work correctly in unique indexes. >>Severity: serious >>Priority: >>Category: mysql >>Class: >>Release: mysql-3.23.41 (Official MySQL RPM) >> > >>Environment: >> > > - 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 create a new thread (errno 12). ( 3.23.49 and Linux )
perror 12 Error code 12: Cannot allocate memory. Either : 1. Add memory ( good ) 2. Add swap ( Not so good ) 3. Tune for less memory usage. David BORDAS wrote: >Hi list, > >just have this when connecting to my mysql dedicated server :( >The server is like this : >bi PIII 1 Ghz >1Go of ram >Raid 5 scsi hdds > >Here is a tail of the error log : >020619 08:03:09 mysqld started >/usr/local/mysql/bin/mysqld: ready for connections > >The system don't swap. >Using Linux 2.4.7-10smp #1 SMP >And mysql : 3.23.49 from tar.gz binary > > > >Here's the my.cnf : ># The MySQL server >[mysqld] >port= 3306 >#socket = /tmp/mysql.sock >skip-locking >set-variable= key_buffer=256M >set-variable= back_log=150 >set-variable= record_buffer=1M >set-variable= sort_buffer=1M >set-variable= max_allowed_packet=1M >set-variable= thread_cache_size=8 >set-variable= thread_stack=128K >set-variable= max_connections=700 >set-variable= max_connect_errors=100 >set-variable= table_cache=256 >set-variable= net_read_timeout=180 >set-variable= net_write_timeout=180 >set-variable= wait_timeout=3600 > >I only have one database and one table ( MyIsam ). >Forums.frm ( 8922 bytes ) >Forums.MYD ( 935258712 bytes ) >Forums.MYI ( 77645824 bytes ) > >Show staus say me that max_used_connection is 611. > >Did someone have an idea about this ? > >Thanks >David > > >- >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: file permissions
The manual says: chown -R mysql.mysql /usr/local/mysql You did not do that. Do the same for MySQL's data directory. Michael Sellers wrote: >I'm very new to mysql. Just learning. I'm trying to correctly set up the >permissions for the files under the mysql/ directory. I've included a >list. I would appreciate it if some one could look over it and recommend >changes. Thank you. > >Michael Sellers > > >/usr/local/mysql > >total 4752 >drwxr-xr-x2 root root 4096 Jun 19 00:05 bin >-rw-r--r--1 root mysqlgrp 122213 Jun 3 05:39 ChangeLog >-rwxr-xr-x1 root mysqlgrp 773 Jun 9 08:13 configure >-rw-r--r--1 root mysqlgrp19106 Jun 8 09:57 COPYING >-rw-r--r--1 root mysqlgrp47577 Jun 8 09:57 COPYING.LIB >drwxr-x---4 root mysqlgrp 4096 Jun 19 23:02 data >drwxr-xr-x2 root mysqlgrp 4096 Jun 9 08:13 include >-rw-r--r--1 root mysqlgrp 147458 Jun 8 09:57 INSTALL-BINARY >drwxr-xr-x2 root mysqlgrp 4096 Jun 9 08:13 lib >drwxr-xr-x2 root mysqlgrp 4096 Jun 9 08:13 man >-rw-r--r--1 root mysqlgrp 2336774 Jun 8 09:56 manual.html >-rw-r--r--1 root mysqlgrp85892 Jun 8 09:56 manual_toc.html >-rw-r--r--1 root mysqlgrp 2021070 Jun 8 09:56 manual.txt >drwxr-xr-x6 root mysqlgrp 4096 Jun 9 08:13 mysql-test >-rw-r--r--1 root mysqlgrp 1976 Jun 3 05:39 README >drwxr-xr-x2 root mysqlgrp 4096 Jun 9 08:13 scripts >drwxr-xr-x3 root mysqlgrp 4096 Jun 9 08:13 share >drwxr-xr-x7 root mysqlgrp 4096 Jun 9 08:13 sql-bench >drwxr-xr-x2 root mysqlgrp 4096 Jun 9 08:13 support-files >drwxr-xr-x2 root mysqlgrp 4096 Jun 9 08:13 tests > > >/usr/local/mysql/bin > >total 15696 >-rwxr-xr-x1 root root 619808 Jun 9 08:13 comp_err >-rwxr-xr-x1 root root 749524 Jun 9 08:13 isamchk >-rwxr-xr-x1 root root 1474 Jun 9 08:13 msql2mysql >-rwxr-xr-x1 root root 828488 Jun 9 08:13 myisamchk >-rwxr-xr-x1 root root 747244 Jun 9 08:13 myisampack >-rwxr-xr-x1 root root 630504 Jun 9 08:13 >my_print_defaults >-rwxr-xr-x1 root root 759028 Jun 9 08:13 mysql >-rwxr-xr-x1 root root 111547 Jun 9 08:13 mysqlaccess >-rwxr-xr-x1 root root 1702 Jun 3 05:39 mysqlaccess.conf >-rwxr-xr-x1 root root 601236 Jun 9 08:13 mysqladmin >-rwxr-xr-x1 root root 615144 Jun 9 08:13 mysqlbinlog >-rwxr-xr-x1 root root 9731 Jun 9 08:13 mysqlbug >-rwxr-xr-x1 root root 595304 Jun 9 08:13 mysqlcheck >-rwxr-xr-x1 root root 3144 Jun 9 08:13 mysql_config >-rwxr-xr-x1 root root 2976 Jun 9 08:13 >mysql_convert_table_format >-rwxr-xr-x1 root root 3835316 Jun 9 08:13 mysqld >-rwxr-xr-x1 root root18415 Jun 9 08:13 mysqld_multi >-rwxr-xr-x1 root root96797 Jun 9 08:13 mysqld.sym.gz >-rwxr-xr-x1 root root 609244 Jun 9 08:13 mysqldump >-rwxr-xr-x1 root root 4986 Jun 9 08:13 mysqldumpslow >-rwxr-xr-x1 root root 2654 Jun 9 08:13 mysql_find_rows >-rwxr-xr-x1 root root 4437 Jun 9 08:13 >mysql_fix_privilege_tables >-rwxr-xr-x1 root root27610 Jun 9 08:13 mysqlhotcopy >-rwxr-xr-x1 root root 591904 Jun 9 08:13 mysqlimport >-rwxr-xr-x1 root root15255 Jun 9 08:13 >mysql_setpermission >-rwxr-xr-x1 root root 592800 Jun 9 08:13 mysqlshow >-rwxr-xr-x1 root root 614688 Jun 9 08:13 mysqltest >-rwxr-xr-x1 root root 3104 Jun 9 08:13 mysql_zap >-rwxr-xr-x1 root root 707928 Jun 9 08:13 pack_isam >-rwxr-xr-x1 root root 625528 Jun 9 08:13 perror >-rwxr-xr-x1 root root 633800 Jun 9 08:13 replace >-rwxr-xr-x1 root root 625204 Jun 9 08:13 resolveip >-rwxr-xr-x1 root root 624232 Jun 9 08:13 >resolve_stack_dump >-rwxr-xr-x1 root root 8463 Jun 19 00:03 safe_mysqld > > >/usr/local/mysql/data > >total 44 >-rw-r--r--1 mysqladm mysqlgrp 3527 Jun 20 19:22 laptop.err >-rw-rw1 root mysqlgrp29777 Jun 20 19:22 log.01 >drwxr-x---2 root mysqlgrp 4096 Jun 17 11:51 mysql >drwxr-x---2 root mysqlgrp 4096 Jun 17 14:08 test > > >/usr/local/mysql/include > >total 400 >-rw-r--r--1 root mysqlgrp21021 Jun 9 08:07 config.h >-rw-r--r--1 root mysqlgrp 9394 Jun 3 05:39 config-win.h >-rw-r--r--1 root mysqlgrp 3445 Jun 3 05:39 dbug.h >-rw-r--r--1 root mysqlgrp 2082 Jun 3 05:39 errmsg.h >-rw-r--r--1 root mysqlgrp 1819 Jun 3 05:39 ft_global.h >-rw
Re: please modify init.d script
Or better yet, add a sleep 2 to the beginning of the init.d program you are starting that expects to connect to mysql. Why slow down the booting for everybody when some other daemon that expects to connect to mysql can not handle a failed connect properly? Florin Andrei wrote: >The init.d script provided with the MySQL RPMs has a problem: if an >application depends on MySQL (say, it's a daemon logging some data in >MySQL), and this application starts right after MySQL, it usually fails. > >The reason is, when the init.d/mysql script returs, usually MySQL is not >fully running, but it's still initializing some stuff. If the other >application has its init.d script right after, it fails to connect to >the database, because the database does not run yet. Depending on the >application, then the application itself might fail to start altogether. > >Please add a delay (like "sleep 2" or something like that) to the start >function in the init.d script. Or modify the start function to not >return until MySQL has booted up properly. Like: > >while [it didn't started yet]; do > sleep 1 >done > - 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: Chinese character error
Your string contains special characters, and must be properly escaped before storing. Use the appropriate string escaping function in your language ( if it exists ) or write a routine to escape them for you before storing them. The manual lists the special characters. henry lee wrote: > Dear professional people, > > When I write a program to store the (Big5) Chinese characters ĀÆS³\ĀøgĆƧ > into mysql database through the mysql ODBC driver, > the original chinese characters change into another characters ĀÆS³¸gĆƧ > in mysql database. > > On the other hand, I have tried the program to store the (Big5) Chinese > characters into another database through another ODBC driver, it is > correct. > The chinese characters remain the same. > - 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: Need last 100 records...
ORDER BY whatever DESC LIMIT 100 Mark S Lowe wrote: >Is there a nifty way to select just that last 100 records with MySQL? In >Oracle I use Maxrows and date to accomplish this. Can¹t seem to figure this >out with MySQL. > >Please advise! Thank you! > >Mark > - 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: configure won't configure
With linux you would: Add /usr/local/lib to your /etc/ld.so.conf file and run ldconfig. Sun should have something similar. [EMAIL PROTECTED] wrote: >>Description: >> > what do I have to do to get configure to use correct gcc options like: >-I/usr/local/include -R/usr/local/lib ??? > >I use following options: > >./configure --prefix=/home/mysql --with-unix-socket-path=/var/tmp/mysql.sock >--with-low-memory --with-mit-threads=yes --enable-thread-safe-client >--with-berkeley-db --enable-local-infile --with-innodb CC=gcc CXX=gcc > >Tried These, nothing works.. > --libdir=/usr/local/lib --includedir=/usr/local/include >'--with-lib-ccflags=-I/usr/local/include -R/usr/local/lib' > >Results: > >configure:8285: gcc -o conftest -DHAVE_CURSES_H >-I/export/home/mysql/src/mysql-3.23.51/include -DHAVE_RWLOCK_T conftest.c -lz >-lcrypt -lgen -lsocket -lnsl -lm >&5 >configure:8288: $? = 0 >configure:8290: ./conftest >ld.so.1: ./conftest: fatal: libz.so: open failed: No such file or directory >Killed > >libz is in /usr/local/lib so without -R/usr/local/lib this will fail of course. > >And again>>> > >configure:8920: checking size of char >configure:9084: gcc -o conftest -O3 -DDBUG_OFF -DHAVE_CURSES_H >-I/export/home/mysql/src/mysql-3.23.51/include -DHAVE_RWLOCK_T conftest.c -lz >-lcrypt -lgen -lsocket -lnsl -lm >&5 >configure:9087: $? = 0 >configure:9089: ./conftest >ld.so.1: ./conftest: fatal: libz.so: open failed: No such file or directory >Killed >... configure: exit 1 > > > >>How-To-Repeat: >> > See above > >>Fix: >> > none > >>Submitter-Id: [EMAIL PROTECTED] >>Originator: >>Organization: AT&T >> > Michael Matthews > > UNIX mail mailto:[EMAIL PROTECTED] > Corporate mail mailto:[EMAIL PROTECTED] > >>MySQL support: none >>Synopsis: configure won't configure >>Severity: non-critical >>Priority: medium >>Category: mysql >>Class: sw-bug >>Release: mysql-3.23.51 (Source distribution) >>Server: /usr/local/mysql/bin/mysqladmin Ver 8.12 Distrib 3.23.28-gamma, for >sun-solaris2.7 on sparc >> >Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB >This software comes with ABSOLUTELY NO WARRANTY. This is free software, >and you are welcome to modify and redistribute it under the GPL license > >Server version 3.23.28-gamma-log >Protocol version 10 >Connection Localhost via UNIX socket >UNIX socket/tmp/mysql.sock >Uptime:18 days 13 min 33 sec > >Threads: 1 Questions: 258266 Slow queries: 5 Opens: 127 Flush tables: 1 Open >tables: 98 Queries per second avg: 0.166 > >>Environment: >> > >System: SunOS webnsf 5.7 Generic_106541-09 sun4u sparc SUNW,Ultra-60 >Architecture: sun4 > >Some paths: /usr/local/bin/perl /usr/local/bin/make /usr/local/bin/gmake >/usr/local/bin/gcc /opt/tools/SUNWspro/bin/cc >GCC: Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.1/specs >Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld >--disable-nls >Thread model: posix >gcc version 3.1 >Compilation info: CC='gcc' CFLAGS='' CXX='gcc' CXXFLAGS='' LDFLAGS='' >LIBC: >-rw-r--r-- 1 bin bin 1696732 Feb 25 2000 /lib/libc.a >lrwxrwxrwx 1 root root 11 Mar 9 1999 /lib/libc.so -> ./libc.so.1 >-rwxr-xr-x 1 bin bin 1115336 Feb 25 2000 /lib/libc.so.1 >-rw-r--r-- 1 bin bin 1696732 Feb 25 2000 /usr/lib/libc.a >lrwxrwxrwx 1 root root 11 Mar 9 1999 /usr/lib/libc.so -> ./libc.so.1 >-rwxr-xr-x 1 bin bin 1115336 Feb 25 2000 /usr/lib/libc.so.1 >Configure command: ./configure --with-unix-socket-path=/var/tmp/mysql.sock >--with-low-memory --with-mit-threads=yes --without-perl --enable-thread-safe-client >--with-berkeley-db --enable-local-infile --with-innodb CC=gcc CXX=gcc > > - 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: mysql & /var dir
shutdown the mysqld, move the data direectory, and set up a symbolic link. Rahadul Kabir wrote: >Hi, >I have MySQL3.23.47 running on a Cobalt RaQ4 System. The mysql >installed datadir turned out to be /var/lib/mysql. /var directory has >it's own partition (/dev/hda3) and total space available is 194MB. As My > >databases are growing and I'm out of space now on the /var directory. > >I am thinking I need to change the datadir variable to somewhere on the >/home directory, where I have > 25GB free. How can I achieve this? Or >is this the right approach? Please provide some solution as details as >possible, as I'm new into this stuff. >Thanks so much. > >Rahad > > >- >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: SubQueries and Temp Tables
You brought it up. You made the comparison. Give us a break. Dave Morse wrote: >Looks like you want to bring up something that doesn't have anything to >do with the original question which is your perogative. But please >don't compare MySQL with Oracle and mainstream SQL RDBMSs. Give us a >break. > >>-Original Message- >>From: Andrew Houghton [mailto:[EMAIL PROTECTED]] >>Sent: Thursday, June 27, 2002 9:10 AM >>To: Dave Morse >>Cc: 'Paul DuBois'; 'Arul'; [EMAIL PROTECTED]; 'MySQL' >>Subject: Re: SubQueries and Temp Tables >> >> >>It makes sense to many, or most, I'd say. Oracle produces >>clients in a >>variety of languages. So does every major database vendor. There is >>zero import in the difference between the languages a server >>and client >>are written in.. it's all a network protocol, for God's sake, so who >>gives a damn? >> >>- a. >> >>Dave Morse wrote: >> >>>NO - mine is a honest question. An "open source" server in C and a >>>client in Java makes sense, I guess to some. >>> >>> -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 5:37 PM To: Dave Morse; 'Arul'; [EMAIL PROTECTED] Cc: 'MySQL' Subject: RE: SubQueries and Temp Tables At 7:16 -0700 6/26/02, Dave Morse wrote: >MySQL is barely an SQL database - it doesn't support much > basic SQL 89 >functionality. Can any one throw some light on why professional SQL >database developers want to use it for anything but simple file >management? AND It is written in C as well so why do Java > >>developers >> >use it? > Given that the server is a separate program than Java developers would write *clients* for, why would it matter in the least what language the server is written in. You're trolling, right? >Regards, > >Dave > > >>-Original Message- >>From: Arul [mailto:[EMAIL PROTECTED]] >>Sent: Tuesday, June 25, 2002 9:05 PM >>To: [EMAIL PROTECTED] >>Cc: MySQL >>Subject: SubQueries and Temp Tables >> >> >>Hi All >> >> I am currently porting our application from Oracle to MySQL. >>We have some subqueries in oracle which cannot be ported into >>MySQL.We even >>tried some joins which didnt work out.. >> >> So Could anyone throw some light on Temporary tables.Is this >>the right way >> to do it.. >> >> Since our main query is dependent on the inner query we >>thought we could >>run >> the inner queryfirst and create a temp table.Then we could >>have a join >> between the main table and the inner table. >> >> Is this advisable.. >> >> Any other better options? >> >>Regards, >> -Arul >> >> >> >> >>- >> >>Please check >>"http://www.mysql.com/Manual_chapter/manual> _toc.html" before >> >>posting. To request this thread, e-mail >>[EMAIL PROTECTED] >> >>To unsubscribe, send a message to the address shown in the >>List-Unsubscribe header of this message. If you cannot see it, >>e-mail [EMAIL PROTECTED] instead. >> > > >--- > >>-- >> >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 >>> >>> >>> >>> >>- >> >>>Please check >>> >>"http://www.mysql.com/Manual_chapter/manual> _toc.html" before >> >>>posting. To request this thread, e-mail >>> >>[EMAIL PROTECTED] >> >>>To unsubscribe, send a message to the address shown in the >>>List-Unsubscribe header of this message. If you cannot see it, >>>e-mail [EMAIL PROTECTED] instead. >>> >>> >>> >> >> >>- >>Please check >>"http://www.mysql.com/Manual_chapter/manual> _toc.html" before >> >>posting. To request this thread, e-mail >>[EMAIL PROTECTED] >> >>To unsubscribe, send a message to the address shown in the >>List-Unsubscribe header of this message. If you cannot see it, >>e-mail [EMAIL PROTECTED] instead. >> >> > > > >- >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: MySQL Question involving AUTO INCREMENT and PRIMARY IDs. - sql
That is a difference in the behavior of isam and myisam tables. jason wesley upton wrote: >EXPLANATION: > >here's the pertinent piece of my sql create statement: > >ID INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (ID)); > >i have used this create statement numerous times without this "problem". in the >past, let's say i inserted 3 entries: A, B, and C. their IDs were 1,2, and >3. then i delete C from the database. when i then insert D its ID is 4. leaving >1,2, and 4 in the database. seems like this is safe and as it should be. > >all this morning, using the above example with a deviation...after i delete C and >then insert D...D's ID is 3. if i delete B and C, then insert D and E...their >ID's are 2 and 3. > >i was under the impression that once an ID had been used (in auto increment and as >primary) it was gone. must i also make the ID "unique"? i can see >why a primary key might need to be not UNIQUE (for concatenation of entries...etc), >but i don't think i've done it iN the past (when it has incremented >correctly). > > > >thanks ahead of time. query sql for the filter. > > > >jason wesley upton > > > > > > > >- >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: Can't find file ./mysql/host.frm
chown -R mysql /var/lib/mysql [EMAIL PROTECTED] wrote: >>Description: >> > When starting safe_mysqld mysqld shutsdown immediately with no error >message. However looking at /var/lib/mysql/matrix.err gives the following >error messages:- >mysqld started >/usr/libexec/mysqld: can't find file: './mysql/host.frm' errno: 13 >mysqld ended > >/var/lib/mysql/mysql/host.frm exists, and I've tried linking it to various >places, with no success. > >>How-To-Repeat: >> > Not sure, system is zipslack 8.0, with binary packages of apache, >mysql, and mod_php installed from the zipslack site. > >>Fix: >> > Don't know > >>Submitter-Id: >>Originator: Richard Kirkcaldy <[EMAIL PROTECTED]> >>Organization: >> > > >>MySQL support: none >>Synopsis: Can't find ./mysql/host.frm >>Severity: critical >>Priority: high >>Category: mysql >>Class:support >>Release: mysql-3.23.39 (Source distribution) >> > >>Environment: >> > 486, zipslack 8.0 >System: Linux matrix 2.2.19 #115 Thu Jun 21 14:07:22 PDT 2001 i486 unknown >Architecture: i486 > >Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc >GCC: Reading specs from /usr/lib/gcc-lib/i386-slackware-linux/2.95.3/specs >gcc version 2.95.3 20010315 (release) >Compilation info: CC='gcc' CFLAGS='' CXX='c++' CXXFLAGS='' LDFLAGS='' >LIBC: >lrwxrwxrwx1 root root 13 Jun 25 17:18 /lib/libc.so.6 -> libc- >2.2.3.so >-rwxr-xr-x1 root root 1159296 Jun 26 2001 /lib/libc-2.2.3.so >-rw-r--r--1 root root 178 May 25 2001 /usr/lib/libc.so >Configure command: ./configure --prefix=/usr --with-mysqld-user=mysql --with- >unix-socket-path=/var/run/mysql/mysql.sock --localstatedir=/var/lib/mysql -- >with-pthread --enable-thread-safe-client --enable-assembler --with-raid --with- >libwrap --without-bench i386-slackware-linux > - 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: installing 3.23.49 on solaris 5.8 fails
It looks like you configured it to install in the source directory. Pushkar Pradhan wrote: >I used gnu's make as recommended, make was successful, however gmake >install gives the foll. error: > /usr/local/gnu/bin/install -c copy-db >/rstc/user1/erc/pushkar/mysql-3.23.49/sql-bench/copy-db >/usr/local/gnu/bin/install: `copy-db' and >`/rstc/user1/erc/pushkar/mysql-3.23.49/sql-bench/copy-db' are the same >file >gmake[2]: *** [install-benchSCRIPTS] Error 1 >gmake[2]: Leaving directory >`/rstc/user1/erc/pushkar/mysql-3.23.49/sql-bench' >gmake[1]: *** [install-am] Error 2 >gmake[1]: Leaving directory >`/rstc/user1/erc/pushkar/mysql-3.23.49/sql-bench' >gmake: *** [install-recursive] Error 1 > >I searched google, documentation but couldn't find any such errors >reported? Does anybody know the problem, config. options: >./configure --prefix=/rstc/user1/erc/pushkar/mysql-3.23.49 > >-Pushkar S. Pradhan > > >- >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: Problem with DB backup
They are not SQL statements. They are both command line tools. You don't run them from inside the mysql client. hlam wrote: >I'm trying to do a backup of my DB using "mysqldump" >and "mysqlhotcopy" but both functions are sending me an error on SQL >syntax. >Could someone tell me what's the correct syntax for this functions. > >HL >- >Net-M@sters S.A. >Plaza Credicorp Bank >Calle 50, Oficina 703 >tel. (507)-210-1518 >fax. (507)-210-1506 [Hora Local: GMT-5] >Apdo. Postal 0833-0045, Plaza Panama >http://www.netmasters.com.pa > > >- >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: Drop keys does not stop indexes being created
You check index files, not table names. myisamchk -k 0 -rq $MYSQLDIR/test/BestGuess.MYI Archer Barrie wrote: >>Description >> >Having followed the instructions in section 5.2.8 to create a table using >LOAD >DATA INFILE *without* its indexes, the indexes are *still* created at the >end >of the LOAD DATA INFILE statement > >>How-To-Repeat: >> >The following shell script demonstrates the problem. There are two directory >listings, before and after the load. In the second one BestGuess.MYI should >be unchanged at 1024 bytes but it isn't because the indexes have been >created even though myisamchk -k 0 has been executed > >Script assumes: >/tmp is available >databases are in /usr/local/var (line 1) > ><<>> >MYSQLDIR=/usr/local/var > >cat >/tmp/bgdata <1|1|'Fordham'|'Emma'|344|'12'|'94'|'7ka3hn5qhtDRbPkJ1uWX/A'|''|1|3|'Lexdon & >Winstree'|'N' >2|1|'Fordham'|'Enoch'|625|'22'|'318'|'Daf1Dt+XH3aq47D8gigWDw'|''|1|3|'Wakefi >eld'|'N' >3|1|'Fordham'|'George'|500|'12'|'164'|'i1L5pD8Q8gI+CFfqkkOWzQ'|''|1|3|'Saffr >on Walden'|'N' >4|1|'Fordham'|'Henry'|548|'14'|'144'|'Md3MtuwgcJtjGs5rKcU8pg'|''|1|3|'Saint >Ives'|'N' >5|1|'Fordham'|'Henry'|209|'3'|'43'|'EpyvpR6wK4tXDCg0dUWThA'|''|1|3|'Edmonton >'|'N' >6|1|'Fordham'|'John'|116|'14'|'7'|'SE1U6ewpSZkU0wA0WRe/pg'|''|1|3|'Cambridge >'|'N' >7|1|'Fordham'|'Lewis'|348|'14'|'68'|'JeHwC7Jnhx6VNFabWRCwQA'|''|1|3|'Linton' >|'N' >8|1|'Fordham'|'Stephen'|268|'6'|'359'|'LS/iLpTXxrfqwlfAVoJdyQ'|''|1|3|'Hatfi >eld& Welwyn'|'N' >9|1|'Fordham'|'female'|416|'14'|'89'|'s91dCImO+HeyIy6rXxldGA'|''|1|3|'Newmar >ket'|'N' >10|2|'FOTHERGILL'|'ROBERT'|206|'25'|'289'|'UIOL6Q5/8cMoeA/k/DmlZg'|''|1|3|'E >astWard'|'N' >EOF > > >mysql -D testEOF > >mysql -D test ( > RecordNumber INT UNSIGNED NOT NULL AUTO_INCREMENT, > ChunkNumber INT UNSIGNED NOT NULL, > Confirmed VARCHAR( 1 ), > Surname VARCHAR( 50 ) NOT NULL, > GivenName VARCHAR( 50 ) NOT NULL, > AgeAtDeath VARCHAR(50), > DistrictNumber SMALLINT UNSIGNED NOT NULL, > District VARCHAR( 50 ) NOT NULL, > DistrictFlag TINYINT UNSIGNED NOT NULL, > Volume VARCHAR( 50 ) NOT NULL, > Page VARCHAR( 50 ) NOT NULL, > Hash CHAR(22) NOT NULL, > RecordTypeID TINYINT NOT NULL, > QuarterNumber SMALLINT NOT NULL, > PRIMARY KEY (RecordNumber), > INDEX (ChunkNumber), > INDEX (Surname(10),GivenName(10),QuarterNumber), > INDEX (Surname(10),GivenName(10),DistrictNumber), > INDEX (Surname(10),QuarterNumber), > INDEX (Surname(10),DistrictNumber), > INDEX (GivenName(10),QuarterNumber), > INDEX (Volume,Page,QuarterNumber), > INDEX (DistrictNumber,QuarterNumber) > ); >EOF > >ls -l $MYSQLDIR/test/BestGuess.M* > >mysqladmin flush-tables >myisamchk -k 0 -rq $MYSQLDIR/test/BestGuess > >mysql -D test IGNORE >INTO TABLE BestGuess >FIELDS TERMINATED BY '|' >ENCLOSED BY "'" >(RecordNumber, ChunkNumber,Surname,GivenName, >DistrictNumber,Volume,Page,Hash, >AgeAtDeath,RecordTypeID,QuarterNumber, >District,Confirmed) >EOF > >ls -l $MYSQLDIR/test/BestGuess.M* > ><<>> > >>Fix: >> >Unknown > >>Submitter-Id: barrie >>Originator: Barrie Archer >>Organization: >> >FreeBMD (http://freebmd.rootsweb.com) > >>MySQL support: none >>Synopsis: drop keys does not inhibit creation of indexes on load >>Severity: serious >>Priority: medium >>Category: mysql >>Class:sw-bug >>Release: mysql-3.23.51 (Source distribution) >>Server: /usr/local/bin/mysqladmin Ver 8.23 Distrib 3.23.51, for >> >unknown-freebsdelf4.2 on i386 >Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB >This software comes with ABSOLUTELY NO WARRANTY. This is free software, >and you are welcome to modify and redistribute it under the GPL license > >Server version 3.23.51 >Protocol version 10 >Connection Localhost via UNIX socket >UNIX socket/tmp/mysql.sock >Uptime:5 days 6 hours 7 min 19 sec > >Threads: 2 Questions: 2215677 Slow queries: 22 Opens: 300 Flush tables: >16 Open tables: 1 Queries per second avg: 4.880 > >>Environment: >> > >System: FreeBSD sump.inv.thebunker.net 4.2-RELEASE FreeBSD 4.2-RELEASE #0: >Wed Feb 7 18:04:50 GMT 2001 >[EMAIL PROTECTED]:/usr/src/sys/compile/SUMP i386 > > >Some paths: /usr/bin/perl /usr/bin/make /usr/local/bin/gmake /usr/bin/gcc >/usr/bin/cc >GCC: Using builtin specs. >gcc version 2.95.2 19991024 (release) >Compilation info: CC='gcc' CFLAGS='' CXX='g++' CXXFLAGS='' LDFLAGS='' >LIBC: >-r--r--r-- 1 root wheel 1169076 Nov 20 2000 /usr/lib/libc.a >lrwxrwxrwx 1 root wheel 9 Feb 6 2001 /usr/lib/libc.so -> libc.so.4 >-r--r--r-- 1 root wheel 559196 Nov 20 2000 /usr/lib/libc.so.4 >Configure command: ./configure --with-innodb > > >- >Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > >To request th
Re: auto-increment usage question
That is the normal behavior for ISAM type files. Convert them to MYISAM. Richard Fox wrote: >>Hi, >> >>I have a mysql table which has a run_id which together with user_id forms >> >the > >>primary key for the table. run_id is not null and auto-increment. I delete >>records from this table, and add new records. I want the run_id to keep >>incrementing and not reuse values, but here is the actual behavior: >> >>When records are deleted, upon the next insert run_id will be given a >>value which is one higher than the greatest value remaining in the table. >> >If > >>the table is empty, run_id will be assigned '1'. >> >>Is there any way in which I can get run_id to keep incrementing and not be >>based on the current highest value in the table, but on the last assigned >>run_id even if that record has been deleted? >> >>If not, are there any common workarounds? >> >>TIA >> >>Rich >> > >sql, query > > >- >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: slave server in readonly
Well, if it is read only, it won't be able to update from the master. GRANT your users no write permission. Pierre Baridon wrote: > > is it possible to start a server in 'read only' mode ? > so that users cannot write in my slave server ? > > thanks, > > Pierre > > > > > > > --sql,query > > > - > 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: error
No, those are termcap database entries. Configure is looking for libtermcap or libterminfo int .the /lib directory. If you are running RedHat Linux you need to install the ncurses rpm. David Johnston wrote: >When running ./configure I am getting the error no termcap libraries but in >/usr/lib/termcap the libs are there. What should I do? I have my mysqlbug >file attached. > - 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: Query realted to Mysql access.
Naathan wrote: >Hello, > >Greetings! > >I am trying hard to connect to MySQL database stored on Linux machine >through a >VB program running on windows on another machine. > >My problems are .. > >Problem No1: > >My Windows machine is under a Windows NT domain. >Linux machine is under another Windows NT domain. > >I created a database in the MySQL server which is in LINUX server. >I installed the MyODBC and created the DSN also. > >I try to connect to MySQL server through a VB coding. > >I am getting the following error message like . > >" [TCX][MyODBC]Host is not allowed to connect this MySQL >server " > >Kindly let me know how to connect the MySQL database stored on LINUX machine >through a VB >coding. > Read about the GRAND command in the manual. > > >Problem 2: > >I have MySQL database stored on Linux machine. >I have LINUX client machine also. >I want to run a application which is created in VB. >I tried to run an VB exe in the Linux machine. I am not able to run the VB >exe. >Can I run the VB exe in LINUX systems? how? > No. > >If yes then what to do for run the VB exe file in Linux? > >Kindly give solutions to my above problems. > >With best regards, > >Naathan. India. > > > >- >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: MAC OS X Server
A. John Peters wrote: > New error msg, I think I have permissions right No you don't. Mysql must own the database directories and files. > > > 020711 08:37:57 mysqld started > 020711 8:37:57 /usr/libexec/mysqld: Can't create/write to file > '/usr/var/e-mac > .pid' (Errcode: 13) > 020711 8:37:57 /usr/libexec/mysqld: Can't find file: > './mysql/host.frm' (errno > : 13) > 020711 8:37:57 /usr/libexec/mysqld: Error on delete of '/usr/var/e- > mac.pid' (E > rrcode: 2) > 020711 08:37:57 mysqld ended > > 020711 08:38:46 mysqld started > 020711 8:38:46 /usr/libexec/mysqld: Can't create/write to file > '/usr/var/e-mac > .pid' (Errcode: 13) > 020711 8:38:46 /usr/libexec/mysqld: Can't find file: > './mysql/host.frm' (errno > : 13) > 020711 8:38:46 /usr/libexec/mysqld: Error on delete of '/usr/var/e- > mac.pid' (E > rrcode: 2) > > > - > 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: Query realted to Mysql access.
OOPS! Bob Bell wrote: >On Thu, Jul 11, 2002 at 08:32:28AM -0500, Gerald Clark ><[EMAIL PROTECTED]> wrote: > >>Naathan wrote: >> >>>I am getting the following error message like . >>> >>>" [TCX][MyODBC]Host is not allowed to connect this MySQL >>>server " >>> >>>Kindly let me know how to connect the MySQL database stored on LINUX >>>machine >>>through a VB >>>coding. >>> >>Read about the GRAND command in the manual. >> > >I'm pretty sure Gerald meant 'GRANT', if it's not immediately >obvious. > - 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: chown: 'mysql': invalid user
Use adduser, or the appropriate command for your version of UNIX to create the mysql account. Alex Jarvis wrote: > To summarize: I was getting a "cannot connect through >socket..." error. It would appear that the server is not running and the >socket doesn't exist. So I tried to start the server (as root) using >safe-mysqld & and mysql.server start, but in either case I recieve the >message: > >chown: 'mysql': invalid user >Starting mysqld daemon with databases from /var/lib/mysql >020711 13:18:45 mysqld ended > > Any suggestions? Keep in mind I'm not an expert with UNIX so it >could be something that seems simple. Thanks again, > >-Alex > > > >- >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: Permissions problem
Since -p="" is not valid syntax, it should not work. There is no equal sign after the -p, and no space between the p and the password which needs no quotes. If you have no password leave out the -p option. Derek Fountain wrote: >Hi, > >I have a server running 3.23.41 on Redhat 7.1. The problem is that I can't >access a database as a local user, but I can as a remote user. That is, on >the local machine I get this: > >>/usr/bin/mysqladmin -u tpdb -p="" create fred >> >/usr/bin/mysqladmin: connect to server at 'localhost' failed >error: 'Access denied for user: 'tpdb@localhost' (Using password: YES)' > >whereas if I access the machine from another Linux box: > >>/usr/bin/mysqladmin -h lowenbrau -u tpdb -p="" create fred >> > >it works. If I do it as the MySQL root user on the local machine that works >OK. I assume something's wrong with my local tpdb user. > >The permissions are set as follows (after a lot of faffing about - I'm not >suggesting these are optimal settings, or the ones I should have): > >localhost root "" >lowenbrau.my.domain root "" >lowenbrau.my.domain tpdb "" >% tpdb "" >localhost tpdb "" > >I've reloaded (and actually restarted) the server, but it won't play. There's >nothing in the db table except a couple of "test" database entries. > >I'm reading up on security issues, but I have someone waiting on this, so if >anyone could give me a pointer as to what I've done wrong, I'd much >appreciate it. > - 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: SELECT performance
What would you expect? You ask for the whole file, and then ask that it be sorted by two fields. How do you expect this to happen without a temp file? Tiago Antao wrote: > Hi! > > I have a very simple query > SELECT a, b FROM t ORDER BY a, b > I also have an index on t(a) > I have run ANALYZE > Also the number of repetitions of values of a in t is very low. > > My view is that the execution should require little temporary space > and little time, something like: > for each different a(already ordered and of fast access from index) { > get all rows (usually 3/4, max arround 300) > sort this (little) subset > } > > What is happening is that a tmp file of the size of the t is being > generated. > > Is there any thing that I am not seeing? I there any way to change > this behaviour? > > Thanks, > Tiago - 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: auto-increment usage question
I verified his problem with 3.23.38 here using myisam files. The key here is that the unique index is across TWO integer fields, one of which is auto_increment. Victoria Reznichenko wrote: >Richard, >Thursday, July 11, 2002, 7:26:00 PM, you wrote: > >RF> But the default table type is already MyISAM > >If you didn't set up another default table type. > >Please, show us the output of >SHOW TABLE STATUS LIKE "your_table_name"; > >Can you create a repeatable testcase? > >And some more info.. >What version of MySQL do you use? and what OS do you use? > >>>That is the normal behavior for ISAM type files. >>>Convert them to MYISAM. >>> >>>Richard Fox wrote: >>> >Hi, > >I have a mysql table which has a run_id which together with user_id > >RF> forms > the >primary key for the table. run_id is not null and auto-increment. I > >RF> delete > >records from this table, and add new records. I want the run_id to keep >incrementing and not reuse values, but here is the actual behavior: > > When records are deleted, upon the next insert run_id will be given > >RF> a > >value which is one higher than the greatest value remaining in the > >RF> table. > If >the table is empty, run_id will be assigned '1'. > >Is there any way in which I can get run_id to keep incrementing and not > >RF> be > >based on the current highest value in the table, but on the last > >RF> assigned > >run_id even if that record has been deleted? > >If not, are there any common workarounds? > > > > > - 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: Problem dealing with load data
The server must be able to read the file, and since the server normally runs as the user 'mysql', it will not be able to read files sitting in root's home directory. Put the file in /tmp, and make it readable by others. Sofiane FAESSEL wrote: > hello everybody > I have a problem using mysql and the load data infile command. i have > all my data in a text file tabulated and using load data as it is > documented i receive this message > "ERROR 13: Can't get stat of '/root/essai.txt' (Errcode: 13)" > here is the command i use > mysql> load data infile '/root/essai.txt' into table essai; > i'm connected as root user essai is a table containing an integer > field and one varchar field (just for trying before uploading my > datas) using mysql import return the same problem and this on two > different machines using mandrake 8.2 and redhat 7.3 with mysql 3.23.49 > thank you for your help > > > _ > Discutez en ligne avec vos amis ! http://messenger.msn.fr > > > - > 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: Replication problems
Did you copy the master.info file over too? Santiago Alba wrote: >Hi All, > >I had a system replication on Linux consisting of MASTER and only one SLAVE. >I stopped replication, I did a backup on my slave and it recreated in >another machine so now I have two SLAVES connected to database MASTER. > >But I found problems. I show you the output on my database MASTER and SLAVE >who is failed: > >*** > >MASTER > >mysql> show master status; >+-+--+--+--+ >| File| Position | Binlog_do_db | Binlog_ignore_db | >+-+--+--+--+ >| log.101 | 54557| | | >+-+--+--+--+ >1 row in set (0.00 sec) > > >SLAVE: > >mysql> show slave status; >+--+-+-+---+ >--+-+---+-+-+--- >-++--+ >| Master_Host | Master_User | Master_Port | Connect_retry | >Log_File | Pos | Slave_Running | Replicate_do_db | Replicate_ignore_db | >Last_errno | Last_error | Skip_counter | >+--+-+-+---+ >--+-+---+-+-+--- >-++--+ >| spiderman.terravista.srv | replica | 3306| 60| >| 4 | Yes | | | 0 | >| 0| >+--+-+-+---+ >--+-+---+-+-+--- >-++--+ >1 row in set (0.00 sec) > > >mysql> show processlist; >++-+---+--+-+--+ >--+--+ >| Id | User| Host | db | Command | Time | State >| Info | >++-+---+--+-+--+ >--+--+ >| 1 | system user | none | NULL | Connect | 7729 | Waiting to >reconnect after a failed read | NULL | >| 2 | root| localhost | NULL | Sleep | 337 | >| NULL | >| 3 | root| localhost | NULL | Query | 0| NULL >| show processlist | >++-+---+--+-+--+ >--+--+ > >In errors log: > >020712 12:43:40 Error reading packet from server: Could not open log file >(server_errno=2) >020712 12:44:40 Slave: Failed reading log event, reconnecting to retry, log >'FIRST' position 4 >020712 12:44:40 Slave: reconnected to master >'replica#spiderman.terravista.srv:3306',replication resumed in log 'FIRST' >at position 4 >020712 12:44:40 Error reading packet from server: Could not open log file >(server_errno=2) >020712 12:45:40 Slave: Failed reading log event, reconnecting to retry, log >'FIRST' position 4 >020712 12:45:40 Slave: reconnected to master >'replica#spiderman.terravista.srv:3306',replication resumed in log 'FIRST' >at position 4 >020712 12:45:40 Error reading packet from server: Could not open log file >(server_errno=2) > >my.cnf: > ># The MySQL server >[mysqld] >port= 3306 >socket = /tmp/mysql.sock >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 ># Try number of CPU's*2 for thread_concurrency >set-variable= thread_concurrency=8 >set-variable= myisam_sort_buffer_size=64M >#log-bin= /mysql/log/log.nnn >server-id = 3 > >master-host = spiderman.terravista.srv >master-user = replica >master-password = x > >*** > >Any suggestion? > >Thanks in advance. > >Santiago. > > > >- >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: Can access DBs when started w/ safe_mysql but not with mysqld????
The mysql user should own the databases and files, not root. David Kramer wrote: >I am able to access all of the database instances that I have created when >starting Mysql with safe_mysql(as root user). As soon as I start mysql any >other way, I keep getting the Access Denied Error. Can root only access DBs >under safe_mysql? Im completely lost here > >Thanks, > >DK > >David Kramer >Reflect.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
Re: Can access DBs when started w/ safe_mysql but not with mysqld ????
Yes, exactly. chown -R mysql /usr/local/mysql chown -R mysql /var/lib/mysql Of course you need to substitute the actual paths for the distribution and data directories. David Kramer wrote: >Ok thats what I was guessing, so I need to create a new user for the DB >seperate from the root. Do I " chown " the binaries and database files to >my new user? Or Do the binaries always stay to root? > >Thanks much! > >DK > >-----Original Message- >From: Gerald Clark [mailto:[EMAIL PROTECTED]] >Sent: Friday, July 12, 2002 11:08 AM >To: David Kramer >Cc: [EMAIL PROTECTED] >Subject: Re: Can access DBs when started w/ safe_mysql but not with >mysqld > > >The mysql user should own the databases and files, not root. > >David Kramer wrote: > >>I am able to access all of the database instances that I have created when >>starting Mysql with safe_mysql(as root user). As soon as I start mysql any >>other way, I keep getting the Access Denied Error. Can root only access >> >DBs > >>under safe_mysql? Im completely lost here >> >>Thanks, >> >>DK >> >>David Kramer >>Reflect.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
Re: query
Difficult to answer without knowing what the "unix-socket problem" is. p shah wrote: >Hi, > >I want to know one thing about MYSQl, >Why does this software always give the unix-socket >problem when compiled and installed. > >I am installing on redhat 7.1. > >Is there a remedy to this or this will continue >forever. > >Any help will be appreciated. > >Thanks > - 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: Permissions problems
If mysql owns them, 0770 should be fine. System Administrator a.k.a. The Root of the Problem wrote: >USually all the databases sets up fine BUT recently, I have >had to adjust databases to 0777 in order to get them to >work and change the ownership. > >I prefer the more secure model of mysql. > >How can I fix this? > - 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