Is there any way to make MySQL tell you what version of the InnoDB plugin it's running? I know you can look at the documentation, but I'm trying to verify a potential bug if the plugin jives with the mysql version installed.
mysql> show variables like '%version%';
+-------------------------+------------------------------+
| Variable_name | Value |
+-------------------------+------------------------------+
| protocol_version | 10 |
| version | 5.1.50-community-log |
| version_comment | MySQL Community Server (GPL) |
| version_compile_machine | x86_64 |
| version_compile_os | unknown-linux-gnu |
+-------------------------+------------------------------+
I found the answer, so I'll pass this along.
1.You must be running the InnoDB plugin instead of the built-in mysql innodb. To do this, you must make these config changes to your my.cnf:
ignore_builtin_innodb
plugin-load = innodb=ha_innodb_plugin.so;innodb_trx=ha_innodb_plugin.so;innodb_locks=ha_innodb_plugin.so;innodb_lock_waits=ha_innodb_plugin.so;innodb_cmp=ha_innodb_plugin.so;innodb_cmp_reset=ha_innodb_plugin.so;innodb_cmpmem=ha_innodb_plugin.so;innodb_cmpmem_reset=ha_innodb_plugin.so
innodb_fast_shutdown = 0
Note: Load individual plugins, but make sure no spaces between the ";". Also innodb_fast_shutdown is optional, but recommended.
2.You must restart mysqld to take the new config changes.
3.Using your SQL interface, execute: "SELECT ##innodb_version;"
mysql> SELECT ##innodb_version;
+------------------+
| ##innodb_version |
+------------------+
| 1.0.11 |
+------------------+
1 row in set (0.00 sec)
Reference URLs:
Getting the version:
http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html#sysvar_innodb_version
Using the plugin engine
http://dev.mysql.com/doc/refman/5.1/en/replacing-builtin-innodb.html
When you have installed InnoDB Plugin you can check out the version by performing the following commands
SELECT * FROM information_schema.plugins;
SELECT ##innodb_version;
Related
We have a mariadb instance running on ubuntu below is the version info:
| Variable_name | Value |
+-------------------------+---------------------------------+
| innodb_version | 5.6.26-76.0 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 10.0.23-MariaDB-1~trusty-log |
| version_comment | mariadb.org binary distribution |
| version_compile_machine | x86_64 |
| version_compile_os | debian-linux-gnu |
| version_malloc_library | bundled jemalloc |
I want to make changes to max_allowed_packet global variable , when is alter the value in the my.cnf file it does not alter the value inspite of restarting the myssqld service.
However, when in set the value using SET GLOBAL MAX_ALLOWED_PACKET = 512; in mysql it does and when i restart the mysqld it resets to the default value.
How do I harden the change, making changes in my.cnf file does not seem to work?
Thanks in advance
The Value is to low. The Range is:
Range: 1024 to 1073741824
see: https://mariadb.com/kb/en/mariadb/server-system-variables/#max_allowed_packet
Was the change in the [mysqld] section of my.cnf? The syntax is just
max_allowed_packet = 512
You don't need to restart mysqld if you both change my.cnf and do SET GLOBAL MAX_ALLOWED_PACKET = ... manually.
I have never seen that low a value. 16M is more reasonable unless you have a tiny amount of RAM.
Be careful of making changes to my.cnf, you can cause more harm than benefit. If you would like, we could review the ideas you have.
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
According to this, there are only two MySQL version
Community
Enterprise
However the version that I installed from my CentOS repo, It is "Source Distribution"
mysql> show variables like '%version%';
+-------------------------+---------------------+
| Variable_name | Value |
+-------------------------+---------------------+
| protocol_version | 10 |
| version | 5.1.73 |
| version_comment | Source distribution |
| version_compile_machine | x86_64 |
| version_compile_os | redhat-linux-gnu |
+-------------------------+---------------------+
5 rows in set (0.01 sec)
I get that as I installed it via repo, it is stating "Source Distribution", but where does it fall in legal terms ?
Sorry for trouble guys. I found my answer.
After googling, found out it is just like community version, the only difference is, it is compiled and maintained by repo.
I have run this sql in windows & Linux version of mysql, and get the different result:
select (((((237803.3300+1659482.4400)/2.00)/1182208.5700)*30.00*6)+
(0.50*`(((((((1159248.2000+687984.6000)/2.00)/1527268.4000)*30.00*6)+
((((457300.0000+1707654.0300)/2.00)/1182208.5700)*30.00*6))
-(((((360.00*((1527268.4000-1182208.5700)-((2587.0000-((5354427.3100*0.0400*6)/12.00))
+99354.4800+10550.5600)))/((((((1159248.2000+687984.6000)/2.00)/1527268.4000)*30.00*6)+
((((457300.0000+1707654.0300)/2.00)/1182208.5700)*30.00*6))*0.5))-(0.50*((2587.0000-
((5354427.3100*0.0400*6)/12.00))+99354.4800+10550.5600)))*
(((((1159248.2000+687984.6000)/2.00)/1527268.4000)*30.00*6)+
((((457300.0000+1707654.0300)/2.00)/1182208.5700)*30.00*6)))/1182208.5700))-
((((237803.3300+1659482.4400)/2.00)/1182208.5700)*30.00*6)))) AS YF`
Windows version of mysql result: 105.93639914104807268662689486
Linux version of mysql result: 144.43789669025999363208811782
And I've been check this expression in some of other platform like java, excel, get the approximately value about: 105.93....., so I thought about that the calculation on linux mysql is incorrect or some of mysql variable set incorrect? Can anybody tell me why?
my linux version of mysql (At cloud server):
mysql>SHOW VARIABLES LIKE "%version%"
+-------------------------+---------------------------------+
| Variable_name | Value |
+-------------------------+---------------------------------+
| innodb_version | 1.1.8-20.1 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 5.5.18.1-Alibaba-rds-201406-log |
| version_comment | Source distribution |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+---------------------------------+
I did not look closely, but you are not selecting FROM anywhere
try this:
select (((((237803.3300+1659482.4400)/2.00)/1182208.5700)*30.00*6)+(0.50*(((((((1159248.2000+687984.6000)/2.00)/1527268.4000)*30.00*6)+((((457300.0000+1707654.0300)/2.00)/1182208.5700)*30.00*6))-(((((360.00*((1527268.4000-1182208.5700)-((2587.0000-((5354427.3100*0.0400*6)/12.00))+99354.4800+10550.5600)))/((((((1159248.2000+687984.6000)/2.00)/1527268.4000)*30.00*6)+((((457300.0000+1707654.0300)/2.00)/1182208.5700)*30.00*6))*0.5))-(0.50*((2587.0000-((5354427.3100*0.0400*6)/12.00))+99354.4800+10550.5600)))*(((((1159248.2000+687984.6000)/2.00)/1527268.4000)*30.00*6)+((((457300.0000+1707654.0300)/2.00)/1182208.5700)*30.00*6)))/1182208.5700))-((((237803.3300+1659482.4400)/2.00)/1182208.5700)*30.00*6)))) AS YF
FROM DUAL
Answer: 105.936399141048
Fiddle: http://sqlfiddle.com/#!2/a2581/32503/0
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)