![]() ![]() If you will need to recover by binary log, or think in use master/slave, so you need to do revision on your MySQL strategy and application, because if you have a function that is signed with ‘Contains SQL’ so all operations inside go to bin log and are replicated. this will affect bin log only of your database. Other option is to edit your functions and stored procedures signing whith ‘NO SQL’. SET too false to SGDB dont do the bin log (remember, bin log is good to recover in case of disaster) ![]() If you dont need recover through binary log and dont use master/slave (replication), so set log_bin_trust_function_creators = 1. You can skip to the end and leave a response. You can follow any responses to this entry through RSS 2.0. This entry was posted on, 20:39 and is filed under MySQL. Execute the following commands to display the list of stored procedures and functions:īinary logging, function, log_bin_trust_function_creators, MySQL, mysqldump, routines, stored procedure Add the line log_bin_trust_function_creators = 1 to the mysql.ini configuration file.SET GLOBAL log_bin_trust_function_creators = 1 Execute the following command into the MySQL console:.Binary logging needs to be enabled in order to restore the functions. But I got the following error message while restoring the database on the destination server:ĮRROR 1419 (HY000) at line 1140: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) We now have our dump file containing the functions and stored procedures. In order to do this, I created a dump file from the source database using the command mysqldump and I then restored the database on the destination server using the previously created dump file.īelow is the command I used to create the dump file:Īnd here is the command used to restore the database: I was in the process of moving a MySQL database from a server to another. I discovered something interesting about MySQL the other day. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |