Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    MYSQL




Program Refusing To DROP DB


I am getting this problem over phpmyadmin and also over a preprogrammed php script.
When there are more than 30 or 40 selected DBs the programs refuse to carry out any command when I click on the drop button.
They would just take as if there is no command issued at all.....

Anyone know how to make it delete more DBs at one time?
I looked at trhe my.cnf file but don't see any options to do this...
It however runs on small batches but I need it to drop a lot more databases at one time.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Mysql Refusing To Start
I am really stuck with the following problem and I have tried
almost all options I could find on Google to no avail.

I recently installed the rpm version of MySQL server 5.0.26
on Fedora Core 3. When I try to start the MySQL server, it fails and
this is the error log I get.

061112 14:50:29 mysqld started
061112 14:50:29 InnoDB: Started
061112 14:50:29 /usr/sbin/mysqld-max: Can't open file: 'host.MYI'
(errno: 142)
061112 14:50:29 Fatal error: Can't open privilege tables: File
'/usr/share/mysql/charsets/?.conf' not found (Errcode: 2)
061112 14:50:29 Aborting

061112 14:50:29 InnoDB: Starting shutdown...
061112 14:50:31 InnoDB: Shutdown completed
061112 14:50:31 /usr/sbin/mysqld-max: Shutdown complete

061112 14:50:31 mysqld ended

I checked the /var/lib/mysql/mysql directory for the host.MYI file and
it is present and owned by mysql with permissions rw_rw_ _ _ _. I
checked what error code 142 meant by

# perror 142

and got the response 'Unknown character set used"

So then I did

# myisamchk -dvv host.MYI and this is the response I get

MyISAM file: host.MYI
Record format: Fixed length
Character set: latin1_swedish_ci (8)
File-version: 1
Creation time: 2006-11-11 15:34:53
Status: checked,analyzed,optimized keys,sorted index pages
Data records: 0 Deleted blocks: 0
Datafile parts: 0 Deleted data: 0
Datafile pointer (bytes): 6 Keyfile pointer (bytes): 5
Datafile length: 0 Keyfile length: 1024
Max datafile length: 109775240917155838 Max keyfile length:
1125899906841599
Recordlength: 390

table description:
Key Start Len Index Type Rec/key Root
Blocksize
1 2 180 unique char packed stripped 0
2048
182 192 char stripped 1

Field Start Length Nullpos Nullbit Type
1 1 1
2 2 180
3 182 192
4 374 1
5 375 1
6 376 1
7 377 1
8 378 1
9 379 1
10 380 1
11 381 1
12 382 1
13 383 1
14 384 1
15 385 1
16 386 1
17 387 1
18 388 1
19 389 1
20 390 1

Clearly, there is no character set missing in the Index file. I then
checked the /usr/share/mysql/charsets directory and found that it
contained only xml files for the index and charset definitions. So then
I transfered *.conf files and Index file into the directory from an
older version of mysql running on a different box. I made sure that the
latin1 character set is defined in both the index file as well as the
index.xml file. I also have the latin1.xml and latin1.conf files
present in the directory.

MySQL 4.0 Refusing Local Connections
I am hardly an expert on MySQL. I have limited knowlege on how MySQL 4.0 works.

I have used MySQL 4.0 nearly half a dozen times, using these steps, and everything working flawlessly.

Download MySQL 4.0 without installer, Extract it to c:mysql. go to c:mysqlin, run winmysqladmin.exe, it will prompt for a username and pass. I type in a fresh combonation. It will start up. I will install the service, and then add the service using the systray icon that appears from winmysqladmin.exe.

Now i am capable of logging in with root, set permissions, build databases, etc... etc...

For some reason, I cannot figure out why. It is now refusing all local connections.

The server is running windows 2000 advanced server. When i install it i do it with the remote desktop connection. simply because the server itself is 1300 miles away.

Problem With Drop Index And Drop Column
I have a table named employees and a table named chargeaccount. Employees has a foreign key with chargeaccount called chargeaccountid. All I want to do is remove that foreign key column. The index name is fk_chargeaccount_employees

But I have a problem with this query:

alter table employees drop index fk_chargeaccount_employees

and this one too:

ALTER TABLE `timesheet`.`employees` DROP COLUMN `ChargeAccountID`;

MYSQL In A Program
How would I access a database from a program? All I need to connect in the program is the IP address or the URL, though I do not know how to get those from a database.

Also, I'm still having trouble with this:
http://forums.mysql.com/read.php?10,141978,141978#msg-141978

Mysqlimport Program
I have been using load data in file command until recently on a windows machine - works fine.

we are now using a Netware 6.5 box and are trying to use mysqlimport from the command line.

I am using:

mysqlimport --password=123456789 --fields-optionally-enclosed-by="" --fields-terminated-by="," 0608c sys:mysqlinstirling.txt

to import a CSV text file into the database 0608c.

the data looks like this

"2007-06-28 16:07:00",0,13.58,15.77,-13.35,-12.69,-13.36,-6.61,-3.821,......

when the program executes it seems to give the desired results except the timedate is all zeros...

Extraction Program
I am looking for a simple extraction/load program to load data daily from a
Progress 8.3B database via ODBC to a mysql 3.23.57 database. It does not
necessarily need to do any data-type transforms. It need to run on Windows
2000 and be able to run it as a service, or as a cron task if running under
Unix.

Setup Program
I'm writing a Java setup program for installing a JDBC app, which connects to a Mysql database.I want to create a script in order to provide final user setting privileges in that database and add it a table, without needing to write Mysql commands.
How can I do it ?

DB Modelling Program
Is there a database (ERM) modelling program for Mac OS X that can handle MySQL? Maybe a freeware one?

Php Email Program
Does anyone know of a php or even cold fusion based script out there for
accessing email that can be customized? Right now I use SquirrelMail
which is great, however, you can't really customize it to tie in with
your web site. Is there something out there that is very flexible that
I could make fit right into my site which is pretty reliable in terms of
web email?

Php Email Program
Does anyone know of a php or even cold fusion based script out there for
accessing email that can be customized? Right now I use SquirrelMail
which is great, however, you can't really customize it to tie in with
your web site. Is there something out there that is very flexible that
I could make fit right into my site which is pretty reliable in terms of
web email

C- Program To Write To Myi , Myd File
is it possible to create a myi, myd file for mysql using a C program. I
am using Stata that is written in C API, and I want to write the data
out to MYSQL database. Using ODBC and loading the data in MYSQL from
STATA takes forever. Can anyone please tell me if I can create the myd
files by using the data in memory thru C programming.

Using MySQL To Input Into Another Program
I have been working on a workaround to see if I can figure out how to get DATA from MySQL into another program. The other program is built on MS SQL server. The problem is that it is so bloated that a remote and my computer at the plant cannot correspond back and forwards. It takes approximately 10 minutes to key an order in to the remote plant.

I was working on a much smaller database through MySQL and using OpenOffice.org as the front end. I just wanted to go a step further and see if there was a way to use a triggering mechanism of some sort to input the data from OOo/MySQL to the actual program the company uses.

Can't Update A Field From VB Program
I've just setup MySQL on a Linux machine and I'm using Visual Basic in
Windows to connect to it (using MySQL ODBC 3.51 driver). Everything works
fine for browsing the database (used for stock control), but some parts of
the VB program refuse to update the database. It was using an Access
database (which worked ok) and I'm using the same SQL statement and table
structure. Code:

Trigger To Run An External Program
Can I trigger an external program to run when a new record is added to
the mysql table?

The external program is in C and instead of scanning the table
continuously for new insertions, it will be better if an external
program could be triggered.

Good Program For Mysql
Do you now a good program for mysql admin like phpMyAdmin, than better!!

Can't Update A Field From VB Program
I've just setup MySQL on a Linux machine and I'm using Visual Basic in
Windows to connect to it (using MySQL ODBC 3.51 driver). Everything works
fine for browsing the database (used for stock control), but some parts of
the VB program refuse to update the database. It was using an Access
database (which worked ok) and I'm using the same SQL statement and table
structure.

Here's the SQL statement that VB runs:

SELECT Stock.GJGStockCode, Stock.PartName, Stock.Discontinued,
Stock.UnitsInStock, Stock.UnitsOnOrder, Stock.ReorderLevel,
Stock.ReorderQty, StockSuppliers.SupplierID,
StockSuppliers.OrderCode, StockSuppliers.PackQty,
StockSuppliers.Price, Stock.PartsToOrder
FROM Stock, StockSuppliers
WHERE Stock.CurrentSupplier = StockSuppliers.Position AND
Stock.GJGStockCode = StockSuppliers.GJGStockCode AND
((Stock.UnitsInStock + Stock.UnitsOnOrder <= Stock.ReorderLevel)
OR
(Stock.PartsToOrder > 0))
ORDER BY StockSuppliers.SupplierID, Stock.GJGStockCode

....which works ok for browsing the database. If I change the
Stock.PartsToOrder field in the VB program, when VB trys to update it I get
the error message "Insufficient key column information for updating or
refreshing". The Stock table has a primary key (GJGStockCode), and the
StockSuppliers table has a primary key (UniqueID) which is an auto_increment
bigint.

Does anybody know what I need to do to allow VB to update the database? Or
is this a VB question!?? - Although the same SQL statement works with an
Access database.

Linking C Program With Mysql API
I'm linking a simple C code with mysql. I compile the code with
this command:

linux> gcc -L/usr/lib/mysql -I/usr/include/mysql sqlTest.cpp -lmysqlclient -lsocket -lnsl

But it complains that "-lsocket" cannot be found. So, I removed "-lsocket" and
try again, then I got the messages like

/tmp/ccIelMdT.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
/usr/lib/mysql/libmysqlclient.a(my_compress.o)(.text+0x66): In function `my_uncompress':
/usr/src/packages/BUILD/mysql-5.0.27/libmysql/my_compress.c:85: undefined reference to `uncompress'
/usr/lib/mysql/libmysqlclient.a(my_compress.o)(.text+0x11c): Infunction `my_compress_alloc':
/usr/src/packages/BUILD/mysql-5.0.27/libmysql/my_compress.c:58: undefined reference to `compress'

My system is SUSE Linux 9.1, and I installed mysql by downloading the rpm files
from this site, and use "rpm -i mysql-xxxx.rpm" to install them. The libraries
are installed at /usr/lib/mysql, and include files are at /usr/include/mysql.
Can anybody tell me how I can configure my system to make it work?

Program MySQL With Apache
I don't even know what this is called, but I'm looking for a free tool that allows me to code MySQL and will work with Apache and PHP.

Program To Optimise Mysql Queries
Basically im looking for a program that will take input (my query) and produce an output with a much nicer, more efficient query. I have seen sql programs that do this sort of thing, but nothing for mysql.
Just wonder if there is any programs that i have missed? Tryed Toad for mysql, but that wasnt what i wanted, i dont want a program to admin a mysql database, simply to produce a more efficient query.

PROGRAM TO UPDATE DATA TABLES
I need to be able to DELETE selected record & LOAD DATA from a text file or Foxpro table, from a program that can run continuously.

I've tried Foxpro, but FoxPro views are too slow. I have also tried issuing these command from Foxpro with an ODBC connection established, but that does not work at all.

The object is to remove all records for a member and replace these records with records from a new file.

Each transaction will be up to 50,000 records.

I need to execute 2 commands:
DELETE FROM parts WHERE parts.member_id="xxx"
and
LOAD DATA INFILE 'd:/xxx.txt' INTO TABLE parts

Packaging A MySQL Database With A Program
In writing a visaul basic database program with Access as the database you simply copy the database file into the packager and it is installed with your program on the target machine. I am guessing that with mysql, since it is a 'server' program, it is not that easy. Am I wrong? And where would I find information on this.

I have been working on a business accounting program and am a long way from finished, but I wanted something more robust than access as the database. I just need to know how to get the database to the target machine with my program.

How To Access MYSql From External Program
I have a Mysql database on a webserver and would like to access order information automatically from my home computer. I have the ecommerce software send me an email of the order and I wrote a VB program to extract the information from the email and populate an Access database. There must be a better way. Can I somehow have MS Access backup that database on my home computer?

Displaying TEXT Datatype With C Program
I'm currently trying to display the contents of a field which datatype
is set to TEXT, I'm trying to output this through a C program.
the line is as follows:

while((row = mysql_fetch_row(result)) != NULL)
{
printf("SID: %d Sensor: %s",(row[1] ? row[1] : "NULL"));
}

I have trued %c and %s in to print the Sensor name, however %s
crashes the program and %c produces a smiley face.

Displaying TEXT Datatype With C Program
I'm currently trying to display the contents of a field which datatype
is set to TEXT, I'm trying to output this through a C program.

the line is as follows:

while((row = mysql_fetch_row(result)) != NULL)
{
printf("SID: %d Sensor: %s",(row[1] ? row[1] : "NULL"));
}


I have trued %c and %s in to print the Sensor name, however %s
crashes the program and %c produces a smiley face.

Another Program To Access MySQL Database
I have a list of 8 rows by 11 columns that I exported from Excel into MySQL to populate my Database and that all made it through.

I am now trying to create a label with a label making program that will connect to a database. I have installed the ODBC 3.51 driver and tested the link and it finds the file.

When I try to open the database file from the label making program it says "Error Reading Record Fields", I click on details and it says "ODBC driver does not support dynasets."

I have no idea what a dynaset is or why it is an error???
Is there a way around this?

I can save the excel file as a DBaseIII .dbf file and it works but I wanted to be able to use a database for better tracking of information.

MySQL Admin Program/Script
I'm looking for an application, or php script that makes entering and retrieving information out of a database automated. The process would like so:
I enter in the mysql un/pass etc. and create tables and rows. Also defining what type of input each row should have. Whether it be a checkbox, a dropdown menu, plain text input. Also defining what options for things like the checkboxes and dropdowns.
After that, you would be able to go to a simple front end that had the inputs you defined. You could create your entries and retrive them. Sorting them how you see fit.
Given the obvious use for such a thing, there must be plenty. I must not be wording my searches correctly though. I would prefer something free/open source.

Redirect Out Of Mysql Client Program To A File
I have mysql on MS Windows2000.

I like to redirect the output/error messages of MySQL client programs to a file.
For example, when I execute:

"mysql --user=root --password=[wrongpaswd] --silent --database=mysql > errfile"

The following error message is coming in the screen, not in 'errfile'

"ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)"

I also need to capture the same for utility "mysqlimport".

How capture the output of these client programs in a file?

Create A C++ Based Program Using Mysql Odbc.
I want my software to be independant of operation system and databases.

That's why I want to use odbc, and don't want to use MFC.
Here I have some questions to ask:
1. On unix (like sun solaris), does there exists any kind of midware
like odbc?
2. I search on the internet, and find most of the examples are based on

PHP. Is there any c++ examples?
3.Once I chose odbc, does that mean that whatever kind of database I
would use later, I don't have to change my source code?
4. now I program on window xp platform. If I use odbc, when impliment
my program to a unix platform, do i have to rewrite my code?

I just started this project, and I'm a newbie. The problems may be a
little bit of stupid.
Can you guys give me some information about this topic?

Developing Database Program Using Delphi And MySQL
how I can use MySQL with Delphi? What I'm really looking for is a header file which can be used in each project which will allow me to use MySQL.

Displaying MySQL TEXT Datatype In C Program
I'm currently trying to display the contents of a field which datatype
is set to TEXT, I'm trying to output this through a C program.

the line is as follows:

while((row = mysql_fetch_row(result)) != NULL)
{
printf("SID: %d Sensor: %s",(row[1] ? row[1] : "NULL"));
}

I have trued %c and %s in to print the Sensor name, however %s
crashes the program and %c produces a smiley face.

Making Connection To Mysql From A C Program On Windows
can any one please tell me "how to make a conncetion to mysql database
from a C program on windows " .
Please help me by giving possible code for making a
conncection,selecting data etc.
i.e. what library files i need to include,what are the functions needed
to be called.

Create My Own VB Backup Program For A Remote MySQL DB
I understand that the basic principles to create a TCP/IP backup program for

a remote MySQL DB are:

a) Query/retrieve the schema.

b) Query/retrieve each table and create inserts for each row of data.

The way I want to do it is even more basic, as I know what my schema is so I

only need to reterieve and create the insert rows to put into my backup text

file, which is basically a large DDL.

The problems that I am experiencing are I want to keep the schema in an

external text file so that I'm not storing it in the actual app and I

thought I would also have another external file to store each 'select * from

tablex' query.

Is this a good way of doing it?

How would I merge the results together to make a new (and 3rd) external text

file backup?

Data On Separate Drive From Program Files
I have a server that I want to run MySQL on.  The server has a 6.4gb hard drive for the OS and applications and a raid array for data that is shared via samba.

What I want to do is install MySQL on the 6.4gb hard drive but have all the DATA saved to the raid array.

Problem: Displaying MySQL TEXT Datatype In C Program
I'm currently trying to display the contents of a field which datatype is set to TEXT, I'm trying to output this through a C program.

the line is as follows:

while((row = mysql_fetch_row(result)) != NULL)
{
printf("SID: %d Sensor: %s",(row[1] ? row[1] : "NULL"));
}

I have trued %c and %s in to print the Sensor name, however %s crashes the program and %c produces a smiley face.

Sql Server Not Showing In The Program Files Of Start Menu
I installed sql server in december 2005 and when I look at the control pannel, its there. But its not showing on the desk top or even in the start > program files menu. So how can I start it?

Drop Down
I have 3 drop down lists depending on what you select in the first drop down, will determine what drop down is displayed, ie when option from dropdown 1 is selected dropdown 2 or 3 will be displayed depending on what option was selected in dropdown 1.

Do I need javascript or caqn it be done without. Really coming near to my deadlone and can't figure this out. Also if this helps the dropdowns are pulling from a mysql database. Code:

Drop Down Box
I have a column with values either 1 or 0. 0 equals disabled, 1 equals on.
By default, it is set to 0
I want a drop down box that can set which this is.
I want to create a drop down box that is like this:

<select name="approve" id="onoff">
<option value="Approve">html</option>
<option value="Leave as is" selected="selected">html</option>
<option value="Delete" selected="selected">html</option>
</select>

then if they choose approve, it changes the 0 to 1, if i choose leave as is, it leaves it at zero. If i choose delete, it deletes the row.
What code would i use to do this

DROP COLUMN X.y;
I tried using the above command to get rid of a column (y) (from table (x) because the column name was not unique).

This didn't work so i just dropped the table and created another. If my table had been bigger this would have been a b***er. I looked in the MySQL manual but DROP only seems to work on db's or tables, or does it?

Drop Table Like ?
Is there any way of using LIKE in a DROP TABLE query? I have several tables I need to remove dynamically, but there is no way of knowing what the table names are. Just the prefixes.

Can't DROP DATABASE
I'm having a problem using the DROP DATABASE command. I use plesk so I have a limited access to phpmyadmin and somehow I created a database that I cannot access through plesk and my only choice is SSH.

So when I get into MySQL through SSH I first listed all my databases using:

SHOW DATABASES;

+-----------+
| Database |
+-----------+
| database1 |
| database2 |
| database3 |
| horde |
| mysql |
| psa |
| test |
+-----------+

Then I tried

DROP DATABASE database1;

and i receive:

Query OK, 0 rows affected (1.89 sec)

But the database is still there and I cant use the same name to create another database in Plesk.

Drop Database
I have a question about dropping MySQL databases. I backup my databases using the following command:

mysqldump db_name | gzip > db_name.gz

I can scp the file to another server (Server B) and restore the database by executing the following 2 commands:

mysqladmin create db_name
gunzip < db_name.gz | mysql db_name

If I drop the database on Server B, the following message is displayed:

Database "db_name" dropped

But the database still shows up when I issue the following command:

mysqlshow

So my question is, why isnt the database being dropped?

Drop A Constraint
I am new to MySQL, and I have inherited an existing MySQL 5 database. One of the tables has unique constraints which are no longer appropriate. But since the DROP CONSTRAINT syntax is no longer supported, I don't have any idea how to drop them.

Drop Foreign Key
I have a table test in which a foreign key called lang points to another table.
When I now wants to remove the foreign key the following error occures:

ERROR 1025: Error on rename of '. estdbmontbl' to '. estdb#sql2-4c0-741 (errno: 152)

Where is the problem?

Drop A Table
Is it possible to use an IF statement to drop a table if it exists and skip it otherwise?

I am trying to get this (pseudo-code):

IF(istable(table1)) then DROP table1 else do nothing

I Can't Drop Tigger
I have trigger:

CREATE TRIGGER tmq_set_severity AFTER INSERT ON stat_mq_queues
FOR EACH ROW BEGIN
:
:
:
END;

For long time everythink was ok. But now I can't do:
select * from stat_mq_queues;
answer is:
ERROR 1415 (0A000): Not allowed to return a result set from a trigger
When I want:
DROP TRIGGER tmq_set_severity;

answer is "ERROR 1415 (0A000): Not allowed to return a result set from a trigger" too.
What's going on?

Can Not Drop Table
I'm trying to change some code on an asp page, this line:

mySQL="drop table snorkTable"

does not seem to close the table. Net time the page is refreshed I'm
told that Table 'snorkTable' already exists.

I suspect my syntax is wrong.

Cannot DROP Database
I've tried to Delete this one Database through "phpMyAdmin" and also through the "Terminal", OSX. I keep getting the same Error:

"Error
SQL query:

DROP DATABASE `PEI`

MySQL said:

#1010 - Error dropping database (can't rmdir './pei', errno: 66)"

I've deleted all the tables in it and also Flushed all Privileges but still no luck...

Drop A Constraint
I have inherited an existing MySQL 5 database. One of the tables has unique constraints which are no longer appropriate. But since the DROP CONSTRAINT syntax is no longer supported, I don't have any idea how to drop them.

Drop Table
my database at the moment which i am correcting but i need to be able to drop over 200 tables that are like 'default_table_%'

The only way i can do this at present is by manually selecting them all in phpmyadmin
is there any syntax that allows a drop table like (matches pattern).


Copyright © 2005-08 www.BigResource.com, All rights reserved