Re: MySQL slow when altering tables.

2007-07-23 Thread mos
At 01:32 PM 7/20/2007, Andrew Rosolino wrote: Whenever I alter a mysql table like add a new field it gets really slow and all other processes lag. Is there a memory variable I can adjust for this? It may be slow because if it is rebuilding the indexes to the table. Don't forget that when

Seeing Table Structure

2007-07-23 Thread tonylabarbara
Hi; I need to see the table structure of all the tables of a database I have. I could also just dump all the data from all the tables in the database and copy the database, thus grabbing the table structures. I canĀ“t find in the documentation how to do either of those. Please advise. TIA, Tony

how to SUM over TIME col (without TIME_TO_SEC)?

2007-07-23 Thread Sebastian Mendel
Hi, how can i get the SUM of a TIME field without using TIME_TO_SEC()? example: SELECT SUM(`my_time`) FROM `table` GROUP BY `id` returns: 765 some completely wrong result, not formated in as TIME SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(`my_time`))) FROM `table` GROUP BY

Re: Seeing Table Structure

2007-07-23 Thread Olaf Stein
I don't know of any way of doing this for all tables. I wrote a python script that creates a html file with information about tables (engine, fields,keys,indices) If you are interested in it I can email it Olaf On 7/23/07 11:34 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi; I need to see

Re: Seeing Table Structure

2007-07-23 Thread Mogens Melander
Try this: # mysqldump -d DBNAME tables.sql --no-data, -d Do not write any row information for the table. This is very useful if you want to dump only the CREATE TABLE statement for the table. On Mon, July 23, 2007 18:22, Olaf Stein wrote: I don't know of any way of doing this for all

max_connect_errors

2007-07-23 Thread Brown, Charles
Hello, Does MySQL store a current error count (for each host?) internally that I can enquire on? I did not find this information in the MySQL manual. If the current error count is available, so that I can monitor it for specific hosts and issue a alert when it crosses a threshold. Please help!

su-like functionality

2007-07-23 Thread Carlo Sogono
Is there a way for mysql to login as an administrator and su to a normal user? What I'd like to achieve is a way to log in to our clients' accounts (we are a web-hosting company) without having to use their passwords. Having to su keeps ownerships and stuff like that in check. Thanks in

Re: su-like functionality

2007-07-23 Thread Olaf Stein
That does not work ... Ownership should not be an issue as all files should belong to the mysql user anyway Just create a second user for the individual databases (you could also just create one account that can do everything, though I do not recommend that) with more rights and use that account

performance of extended insert vs. load data

2007-07-23 Thread Sid Lane
all, I need to migrate ~12GB of data from an Oracle 10 database to a MySQL 5.0one in as short a window as practically possible (throw tablespace in r/o, migrate data repoint web servers - every minute counts). the two approaches I am considering are: 1. write a program that outputs the

Re: performance of extended insert vs. load data

2007-07-23 Thread Perrin Harkins
On 7/23/07, Sid Lane [EMAIL PROTECTED] wrote: is either one significantly faster than the other? Yes, LOAD DATA INFILE is much faster. are there additional (faster) approaches I have not thought of? Not that I've found. I think you'd have to write directly to the C API to beat LOAD DATA

Re: performance of extended insert vs. load data

2007-07-23 Thread B. Keith Murphy
I think you will find the load data infile will work faster. I am performing testing right now in preparation for a migration from 4.1 to 5.0 but I am confident that will be the case. Keith - Original Message - From: Sid Lane [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent:

Re: performance of extended insert vs. load data

2007-07-23 Thread mos
At 11:44 AM 7/23/2007, Sid Lane wrote: all, I need to migrate ~12GB of data from an Oracle 10 database to a MySQL 5.0one in as short a window as practically possible (throw tablespace in r/o, migrate data repoint web servers - every minute counts). the two approaches I am considering are: 1.

Re: performance of extended insert vs. load data

2007-07-23 Thread Perrin Harkins
On 7/23/07, mos [EMAIL PROTECTED] wrote: Load data will of course be much faster. However to obtain the maximum speed you need to load the data to an empty table, because then MySQL will load the data without updating the index for every row that's added, and will instead rebuild the index only

Re: Seeing Table Structure

2007-07-23 Thread tonylabarbara
Yes, please, email it to me. Tony -Original Message- From: Olaf Stein [EMAIL PROTECTED] To: [EMAIL PROTECTED]; MySql mysql@lists.mysql.com Sent: Mon, 23 Jul 2007 12:22 pm Subject: Re: Seeing Table Structure I don't know of any way of doing this for all tables. wrote a python

Re: Seeing Table Structure

2007-07-23 Thread tonylabarbara
That works. Thanks. Tony -Original Message- From: Mogens Melander [EMAIL PROTECTED] To: Olaf Stein [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; MySql mysql@lists.mysql.com Sent: Mon, 23 Jul 2007 12:29 pm Subject: Re: Seeing Table Structure Try this: # mysqldump -d DBNAME tables.sql

Re: su-like functionality

2007-07-23 Thread Mogens Melander
On Mon, July 23, 2007 10:19, Carlo Sogono wrote: Is there a way for mysql to login as an administrator and su to a normal user? What I'd like to achieve is a way to log in to our clients' accounts (we are a web-hosting company) without having to use their passwords. Having to su keeps

Re: performance of extended insert vs. load data

2007-07-23 Thread Mogens Melander
Shure, load data is way faster than full inserts. I was thinking: while $warnings -lt 100% do dump ora-data | mysql database done swap IP-addr. On Mon, July 23, 2007 19:59, B. Keith Murphy wrote: I think you will find the load data infile will work faster. I am performing testing right

mysql dump help!

2007-07-23 Thread Red Hope
Hey y'all, I've been fussing with the MySQL dump procedure to backup my stuff. I'm on MySQL 5.0.41 and I have tried so hard to get it to dump my files into .sql format but my syntax is wrong, wrong, wrong. lol I put below examples what I've been entering to get my databases backed up. I always

Re: mysql dump help!

2007-07-23 Thread Carlos Proal
One common error is trying to do this inside the mysql console, instead of the shell prompt, i think thats your problem because at least the first one is correct. Carlos Red Hope wrote: Hey y'all, I've been fussing with the MySQL dump procedure to backup my stuff. I'm on MySQL 5.0.41 and

Re: mysql dump help!

2007-07-23 Thread Red Hope
Oh boy, and here's the big stupid question. How do I get to the shell prompt? Sorry! Yea, I'm that newbie. :) Thank you, Lillian --- Carlos Proal [EMAIL PROTECTED] wrote: One common error is trying to do this inside the mysql console, instead of the shell prompt, i think thats your

Re: mysql dump help!

2007-07-23 Thread Carlos Proal
Well hopefully, typing quit at the mysql console get you back to the shell. Otherwise, you need to open a Gnome Console, KDE Konsole or Windows CommandPrompt from the different menus on your operating system If the mysql directory is on your PATH you can use mysqldump anywhere, if not,

Re: mysql dump help!

2007-07-23 Thread Red Hope
Well, that went over my head. :) I understand what you're telling me, how to get there, but not how to do it. bleh. When I start up MySQL Command Line Client, I'm always prompted at mysql. So I told it to switch from that prompt to shell prompt. It always starts up in mysql prompt. Once I'm in

Re: mysql dump help!

2007-07-23 Thread Carlos Proal
Can you email us the complete command and the error ? Carlos Red Hope wrote: Well, that went over my head. :) I understand what you're telling me, how to get there, but not how to do it. bleh. When I start up MySQL Command Line Client, I'm always prompted at mysql. So I told it to

Re: su-like functionality

2007-07-23 Thread Carlo Sogono
Mogens Melander wrote: On Mon, July 23, 2007 10:19, Carlo Sogono wrote: Is there a way for mysql to login as an administrator and su to a normal user? What I'd like to achieve is a way to log in to our clients' accounts (we are a web-hosting company) without having to use their passwords.

Re: mysql dump help!

2007-07-23 Thread Mogens Melander
mysqldump -u user -p -q --single-transaction --tab=/dest/dir database or mysql -u root -ppassword database output.sql On Tue, July 24, 2007 03:16, Red Hope wrote: Hey y'all, I've been fussing with the MySQL dump procedure to backup my stuff. I'm on MySQL 5.0.41 and I have tried so hard to

Re: mysql dump help!

2007-07-23 Thread Mogens Melander
I think we are daling with a windows user, who are not that familiar with a command prompt. Correct me if i'm wrong. How to get to a point where you would be able to execute a mysqldump, will depend on what OS you are running, and how you installed MySQL. On Tue, July 24, 2007 04:41, Carlos

Re: su-like functionality

2007-07-23 Thread Mogens Melander
Ok, if memory serves me right, phpmyadmin use the credentials from mysql's grant/deny schema. So when loggin into PMA, you will have the priveleges on the server that was granted to that user. When installing/configuring PMA, it will insist on getting a root/privilleged users login/password to use

Re: Seeing Table Structure

2007-07-23 Thread Steve Edberg
If you have MySQL5 you can show table structure via the 'information_schema' pseudo-database. This has the advantage of dumping column data for all tables in one output table. In addition, you can select/sort the metadata using standard SQL: [EMAIL PROTECTED] show tables from information_schema;

Lost Connection

2007-07-23 Thread krishna chandra prajapati
Hi All, I have connect to mysql-server using client. When i run the query it give message lost connection to mysql. The details is as below. mysql select user_id, user_name from user_info; ERROR 2013 (HY000): Lost connection to MySQL server during query. System configuration is Pentium 2.6 Ghz

Lost Connection

2007-07-23 Thread krishna chandra prajapati
Hi All, I have connect to mysql-server using client. When i run the query it give message lost connection to mysql. The details is as below. mysql select user_id, user_name from user_info; ERROR 2013 (HY000): Lost connection to MySQL server during query. System configuration is Pentium 2.6 Ghz

Re: Lost Connection

2007-07-23 Thread Carlos Proal
This can be a serious issue, maybe a sign of some kind of data corruption. If you lost the connection, probably the server is restarting (you can check that on the error log), do this happen only with this table ? Carlos krishna chandra prajapati wrote: Hi All, I have connect to

Re: performance of extended insert vs. load data

2007-07-23 Thread Ravi Prasad
mysqlimport with parallel threads is worth giving a try. It is similar to 'load data infile' but with concurrent threads loading the tables. I think , it was added in mysql-5.1.18. But it is said to work with previous versions also according to the author :

Re: mysql dump help!

2007-07-23 Thread Red Hope
Hey y'all, I use charming Windows XP on here. I've taken database classes but lucky for me we never used *real* MySQL. Below I typed up exactly what I put into the MySQL prompt and this is what it kicks back to me. Lillian mysql mysql \R shell PROMPT set to 'shell' shell shellmysqldump -u

Re: mysql dump help!

2007-07-23 Thread Ananda Kumar
try this mysqldump -u root -ppassword --database test test.sql On 7/24/07, Red Hope [EMAIL PROTECTED] wrote: Hey y'all, I use charming Windows XP on here. I've taken database classes but lucky for me we never used *real* MySQL. Below I typed up exactly what I put into the MySQL prompt and

Re: mysql dump help!

2007-07-23 Thread Carlos Proal
Yep, good for you, welcome to the real world You are changing the prompt but are still inside the dbms, you need to get out, because mysqldump is an application (.exe file) not a sql command, ie Welcome to the MySQL monitor.