473,545 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

stop optimize table`?

While trying to shorten my files, I tried optimize table - later I
found that I need:

mysqlcheck -u root -p[password[ --all-databases --analyze --optimize
(thanks to Markus Popp).

But it gives this error:

mysqlcheck: Got error: 1044: Access denied for user 'root'@'localho st'
to database 'information_sc hema' when executing 'OPTIMIZE TABLE ... '

How can I stop this?
The optimise command seem to be in the way (and since I started it, my
computer has got pretty slow)

S

Nov 25 '05 #1
3 4923
Hi,

that's a bug, but it should be solved in MySQL 5.0.16. You can use this
workaround:

mysqlcheck -u root -p --databases [database1, database2,
....] --analyze --optimize

Markus
Nov 25 '05 #2
Sorry for being a newbie/stupid here, but...

I ran that, it worked - but my DB grew from 1 GB to 1,18 GB (and I have
deleted 2 tables lately, it was 740 Mb).

Aften that I tried to run the previous recommended command:
mysqlcheck -u root -p[password] --all-databases --analyze --optimize

with the same error message as always.

Should my DB have become smaller by this?

S

Nov 25 '05 #3
If you use a MySQL version before 5.0.16, you should specify the databases
one by one (due to that bug that's solved in 5.0.16).
Should my DB have become smaller by this?


If there are tables that are not optimized (for example because there are
'holes' in the files from data that has been deleted), it should.

Running this command from time to time has these 2 advantages:

* the data files are defragmented, so they can be read slightly faster and
consume less disk space
* the index statistics are re-calculated, so the query optimizer can make
better decisions on how to execute a query.

Markus
Nov 25 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1976
by: Aaron | last post by:
I've been using MySQL for several months and enjoyed great success when installing other people's scripts to databses I make using phpMyAdmin. My challenge is developing from scratch the scripts, for which I've got good resources, manuals, and much time into practice and test. My question is three-fold, as I have 14,000 records of...
2
2805
by: Chris Welsh | last post by:
I have a large'ish mySQL table, very text heavy (although no fields are larger than varchar 255). I do a bulk update once a day, which probably removes a 1/4 of the records, replacing them with fresh records. I find my table swiftly becomes massively inefficent, with the reported overhead soon exceeding the actual size of the table. So my...
0
1411
by: steve | last post by:
Optimize table in mysql is nice!! but seems to require table names. Any way I can run it for my entire db? I like to do this in a batch process from time to time. FYI, I was having SERIOUS perf. problems on my box, until I optimized the tables that had huge number of rows deleted. Don’t believe the mysql documentation that this is not...
0
1133
by: steve | last post by:
I am running mysql 4.0.16. Optimize table does not work with LOCAL or NO_WRITE_TO_BINLOG options, and gives me mysql error. Any ideas? -- http://www.dbForumz.com/ This article was posted by author's request Articles individually checked for conformance to usenet standards Topic URL:...
0
1783
by: Andreas Falck | last post by:
Hi, I ran the code below on two different versions, 4.0.14 and 4.0.16 respectively, both running RH 7.3 on intel. In version mysql server version 4.0.14 the SELECT privelege suffices for "optimize table", but (seemingly) the server version 4.0.16 requires INSERT as well. Is the INSERT privelege necessary for performing optimize in mysql
2
3945
by: Jacky Luk | last post by:
Hi, I can't seem to find a way to delete all records of a table. I created my tables in MySQL Query Browser, then fill them up with VC++, but some records were incorrect, And I had to recreate the table again. So please help, I just wanted to delete the records rather than dropping the table completely and start over again.. Thanks Jack
5
1351
by: pedalpete | last post by:
I'm fairly new to sql, and am having a problem with a query taking forever to run. it's 8 seconds to run each query. I think I have my indexes correct, but I can't seem to find the output which describes the indexes. I have done an 'explain' on the query, and this is what I got id | select_type | table | type | possible_keys ...
0
1802
by: pedalpete | last post by:
Hey MySql Gurus, I've been having some issues with my database starting a few days ago, though I haven't changed any of the db code in at least 3 weeks. I do some daily maintenance on my database, and as a part of that I finish by running 'OPTIMIZE TABLE' on a few of the tables which change regularly. This causing one of my tables to be...
4
4325
by: slenish | last post by:
Hello everyone, I am wondering how can I stop someone from linking to tables on my database? I was playing around and testing a database I finished and found that I can link to the tables still, even hidden ones. So im trying to figure out a way you can not create a link to them either at all or with out a password or something. I have been...
0
7680
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7446
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7778
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6003
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5349
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4966
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3476
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3459
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1033
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.