I do have a highly active server and can't restart it. Long back I have activated the audit log but due to space issue I need to turn it off. Below are my variables;
audit_log_buffer_size | 1048576 |
audit_log_connection_policy | ALL |
audit_log_current_session | ON |
audit_log_exclude_accounts | |
audit_log_file | audit.log |
audit_log_flush | OFF |
audit_log_format | OLD |
audit_log_include_accounts | |
audit_log_policy | ALL |
audit_log_rotate_on_size | 0 |
audit_log_statement_policy | ALL |
audit_log_strategy | ASYNCHRONOUS |
And here is my.cnf
plugin-load=audit_log.so
.
.
.
# Audit Log -
#--------------------------
#audit-log=FORCE_PLUS_PERMANENT
#audit_log_exclude_accounts=.....
#audit_log_file= /var/log/mysql/mysql_audit_db1.log
.
.
.
Solution:
After running UNINSTALL PLUGIN audit_log; it stopped logging to audit_log file for me. To verify that you can use SHOW PLUGINS;
mysql> UNINSTALL PLUGIN audit_log;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> show warnings;
Warning | 1620 | Plugin is busy and will be uninstalled on shutdown enter code here
As FORCE_PLUS_PERMANENT looks commented out, you might use the UNINSTALL PLUGIN command, as written here:
https://dev.mysql.com/doc/refman/5.5/en/server-plugin-loading.html#server-plugin-uninstalling
If the FORCE_PLUS_PERMANENT is active, you're out of luck, as this is to protect the audit log from on-the-fly disabling.
Related
Following documentation on how to set up a MariaDB Galera cluster, I simply created the proper config files and started my primary db server with the galera_new_cluster command (I'm running RHEL7). According to the documentation, at that point you should be able to run:
SHOW STATUS LIKE 'wsrep_cluster_size';
And see
+--------------------+-------+
| Variable_name | Value |
+--------------------+-------+
| wsrep_cluster_size | 1 |
+--------------------+-------+
However, I see wsrep_cluster_size of zero with these other relevant values:
MariaDB [(none)]> show global status like 'wsrep%';
+--------------------------+----------------------+
| Variable_name | Value |
+--------------------------+----------------------+
| wsrep_cluster_conf_id | 18446744073709551615 |
| wsrep_cluster_size | 0 |
| wsrep_cluster_state_uuid | |
| wsrep_cluster_status | Disconnected |
| wsrep_connected | OFF |
| wsrep_local_bf_aborts | 0 |
| wsrep_local_index | 18446744073709551615 |
| wsrep_provider_name | |
| wsrep_provider_vendor | |
| wsrep_provider_version | |
| wsrep_ready | OFF |
| wsrep_thread_count | 0 |
+--------------------------+----------------------+
My settings in /etc/my.cnf.d/server.cnf are:
bind_address=172.28.7.15
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_name="galera_cluster"
wsrep_cluster_address="gcomm://172.28.7.15,172.28.7.18,172.28.7.19"
wsrep_node_address=172.28.7.15
wsrep_node_name='node01'
wsrep_slave_threads=1
wsrep_certify_nonPK=1
wsrep_max_ws_rows=131072
wsrep_max_ws_size=1073741824
wsrep_debug=1
wsrep_convert_LOCK_to_trx=0
wsrep_retry_autocommit=1
wsrep_auto_increment_control=1
wsrep_drupal_282555_workaround=0
wsrep_causal_reads=0
wsrep_notify_cmd=
wsrep_sst_method=rsync
And I've confirmed that the variables are loaded using SHOW VARIABLES.
I feel like I'm following the documentation exactly and it's just not showing what I expect. The only warnings in logs are warnings about SSL not being set up - is that required?
You mentioned you didn't see any WSREP logs in /var/log/mariadb/mariadb.log. Perhaps wsrep_on option is set to OFF. Try setting it to ON.
Lots of documentation assumes MariaDB Galera 10.0. But in 10.1 and higher, wsrep_on defaults to OFF.
Default Value: OFF (>= MariaDB 10.1), ON (<= MariaDB Galera Cluster 10.0)
https://mariadb.com/kb/en/mariadb/galera-cluster-system-variables/#wsrep_on
For Centos 7, edit your /etc/my.cnf file and
setenforce 0
write it on your all nodes.
Then start your cluster and connect nodes.
I've stuck on this problem for a while.
I need to schedule a job for my query daily so I have to set global event_scheduler = ON
and I got this message ..
1577 - Cannot proceed because system tables used by Event Scheduler were found damaged at server start
some guys told me i have to restart db and do it again but it's not work.
I was going to my.cnf and type event_scheduler = ON in [mysqld] section and restart again
and it's still DISABLED.
someone told me it's a bug of version 5.5 but i'm using 5.6 .....
MariaDB [(none)]> SHOW VARIABLES LIKE "%version%";
+-------------------------+---------------------+
| Variable_name | Value |
+-------------------------+---------------------+
| innodb_version | 5.6.22-72.0 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 10.0.17-MariaDB |
| version_comment | Source distribution |
| version_compile_machine | i386 |
| version_compile_os | osx10.6 |
| version_malloc_library | system |
+-------------------------+---------------------+
so I have no any idea what should i do with this thing :(
I also can't access the EVENT table in information_schema db with the same error.
if anyone can solve my problem. i'll owe you guys my entire life.
** i sincerely apologise if it's a stupid question **
Ps. I use XAMPP.
It is generally a good idea to research error codes and messages:
https://serverfault.com/questions/385015/mysql-damaged-system-tables
https://serverfault.com/questions/562282/mysqldump-error-1557-corrupt-event-table
https://serverfault.com/questions/100685/cannot-proceed-because-system-tables-used-by-event-scheduler-were-found-damaged
https://bugs.mysql.com/bug.php?id=70975
I have logged into phpmyadmin and have about 15 tables. I click on the one table and the data structure page loads up. I click on another and it works fine as well. However, when clicking on a certain table, it logs me out of phpmyadmin and I get this error message:
No activity within 1800 seconds; please log in again
I logged back in again and every time I click the specific table, it's giving me the error message. No other tables are having this trouble.
Any reasons for the cause of this and how to fix.
Thanks
Hi I also got the same Issue. I solved it by adding below line to my config.inc.php i.e by extending my time limit from 1800 seconds to 86400 seconds
$cfg['LoginCookieValidity'] = 86400;
For more details Please Refer the below link and follow the instructions over there.Thankyou!
http://firstcode.info/php-no-activity-within-1800-seconds-error/
For starters, this happened to me when I clicked "reset" in the settings panel of PHPMyAdmin and then clicked "apply" while on the features tab, which basically set "Login cookie validity" to empty string.
Played around plenty with config files in /var/lib/phpmyadmin/, /usr/share/phpmyadmin/, and /etc/phpmyadmin/ but no changes to login cookie validity had any effect.
So I figured PHPMyAdmin must have saved this dreaded configuration in a database. So I did the following:
mysql -u root -p
Enter password:
mysql> USE phpmyadmin
Database changed
SHOW TABLES;
+------------------------+
| Tables_in_phpmyadmin |
+------------------------+
| pma__bookmark |
| pma__central_columns |
| pma__column_info |
| pma__designer_settings |
| pma__export_templates |
| pma__favorite |
| pma__history |
| pma__navigationhiding |
| pma__pdf_pages |
| pma__recent |
| pma__relation |
| pma__savedsearches |
| pma__table_coords |
| pma__table_info |
| pma__table_uiprefs |
| pma__tracking |
| pma__userconfig |
| pma__usergroups |
| pma__users |
+------------------------+
19 rows in set (0.00 sec)
SELECT * FROM pma__userconfig
+---------------+---------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| username | timevalue | config_data |
+---------------+---------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| root | 2020-10-14 10:02:23 | {"LoginCookieValidity":"","LimitChars":500,"SQLQuery\/Explain":false,"SQLQuery\/ShowAsPHP":false,"MaxTableList":"","Server\/hide_db":"","collation_connection":"utf8mb4_unicode_ci"} |
+---------------+---------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
Sure enough, this is the bugger the config files weren't modifying. So I ran:
DELETE FROM pma__userconfig WHERE username='root'
Query OK, 1 row affected (0.00 sec)
FLUSH TABLES pma__userconfig
Then I restarted Apache for good measure:
sudo service apache2 restart
And voilĂ , all in the world was right again.
I was working with netbean's database explorer (services tab) and accidentally deleted one of the databases.
I was trying to connect to a database and there were 2 options in the context menu for connecting.
1)Connect
2)Delete
I accidentally hit delete. It did not even ask me for confirmation. Is there anyway to recover the database?
I don't have access to mysql server. I can just connect to the database using mysql workbench.
Thanks a ton!
If you have the binary logging enabled, then you might have a chance to use it to restore your database.
Else use an older backup and restore it !
To find binary logs status :
mysql> show variables like '%bin%';
+---------------------------------+----------------------+
| Variable_name | Value |
+---------------------------------+----------------------+
| binlog_cache_size | 32768 |
| innodb_locks_unsafe_for_binlog | OFF |
| log_bin | OFF |
| log_bin_trust_function_creators | OFF |
| max_binlog_cache_size | 18446744073709547520 |
| max_binlog_size | 1073741824 |
| sync_binlog | 0 |
+---------------------------------+----------------------+
7 rows in set (0.00 sec)
I have a script running a batch of very similar queries.
All of them, except one, run without any problem.
Only one query is getting stuck.
In "show processlist" the query has state=null
According to docs, show processlist should report "State=null" only for the "show processlist" thread itself.
Server version: 5.0.67 MySQL Community Server (GPL)
mysql> show processlist;
+---------+--------+-----------+--------------+---------+------+-------+------------------------------------------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+---------+--------+-----------+--------------+---------+------+-------+------------------------------------------------------------------------------------------------------+
| 3866613 | user | localhost | db_name | Query | 1986 | NULL | select log_time,log_action,log_action_id,log_object_id, #abcde:=if(log_action='abcde',to_ |
| 3873414 | root | localhost | NULL | Query | 0 | NULL | show processlist |
+---------+--------+-----------+--------------+---------+------+-------+------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
Could be a bug of your version of mysql, take a look at this bug for more information .