Saturday, December 31, 2022

centru comunitar cultural

 Îmi amintesc că acum vreo 2-3 ani treceam pe lângă un șantier cu o plăcuță descriptivă de genul "centru comunitar cultural" sau ceva în sensul ăsta.

După ce s-a terminat toată chestia cu șantierul, ce a apărut? Un bar oarecare, ceva mai măricel și atât...  

Deh, acum barurile și cârciumile sunt numite "centre comunitare"... 

Câmpulung Muscel...2022


Wednesday, December 28, 2022

SQL Error (1356)- what you have to know before using mysqldump for backup

these facts are applying only if you change the database version!

 

Say you are upgrading from mariadb 10.2 to mariadb 10.6 or whatever upgrade are you doing and you have an sql dump file produced by 'mysqldump'.

chances are very high that on restoration with 'source' you will broke the most important tables in your fresh mariadb: mysql, information_schema, performance_schema and sys because these tables are changing from version to version. and is a pain to repair these tables... you will have the following error: "

SQL Error (1356): View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

"

you will see that there aren't any users in your user table and you can make connections to mariadb with any user/password combination. the security and other important features of a database are totally gone.

so, when you backup your entire database you need to exclude from mysqldump the above tables, something like:

mysqldump ... -all-databases -ignore-database mysql -ignore-database information_schema etc etc.  ( check the correct syntax please).

at the restoring moment using source all will run great this time.

this solution and precaution i hardly found on the onth internet, but, allas, only after i entered the above error.

i guess, if you really are a masochist, you can manually edit the sql dump file and remove from there any reference to the above tables.