update string mysql

UPDATE image SET w65 = REPLACE(w65, ‘//site.net/media/’, ‘/media/’) WHERE w65 LIKE ‘%site.net%’;

Advertisements

Show each tables size in mysql database

 

Show each table size in mysql database:

SELECT 
    table_name AS "Table",  
    round(((data_length + index_length) / 1024 / 1024), 2) as TEST   
FROM information_schema.TABLES  
WHERE table_schema = "YOUR_DATABASE_NAME"  
ORDER BY TEST;

 

Show each database size in mysql:
SELECT table_schema "DB Name", Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" FROM   information_schema.tables GROUP  BY table_schema;