can't access local mariadb mac: InnoDB error - mysql

I am trying to setup MariaDB on my local machine.
Whenever I try to log in with:
mariadb -u <mac_name> or mariadb -u root I get this error:
using my mac password also doesn't work.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
When I tail the logs found at /usr/local/var/mysql/<host_name>.err or /usr/local/var/mysql/<host_name>.local.err
I get these errors:
[Note] InnoDB: Completed initialization of buffer pool
[ERROR] InnoDB: Invalid flags 0x4800 in ./ibdata1
[ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
[Note] InnoDB: Starting shutdown...
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[Note] Plugin 'FEEDBACK' is disabled.
[ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting
Does anyone know how I could get this working?

Related

Mysql with magento causing drop in mysql connection

What does these errors mean and why does they occur
2020-12-11T10:11:48.355887Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2020-12-11T10:11:48.356116Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-12-11T10:11:48.356132Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-12-11T10:11:48.356650Z 0 [ERROR] Failed to initialize builtin plugins.
2020-12-11T10:11:48.356665Z 0 [ERROR] Aborting
2020-12-11T10:11:48.357957Z 0 [Note] Binlog end
2020-12-11T10:11:48.364822Z 0 [Note] Shutting down plugin 'CSV'
2020-12-11T10:11:48.366417Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
The following error occured due to magento setup:upgrade
As a result the mysql connection keeps dropping for every request (if i refresh page.navigate to other page)

mysqld: Can't create/write to file (Errcode: 13)

I installed mariadb on my archlinux box recently and wanted to run mysqld with different data and tmp directories
[mysqld]
user = mysql
port = 3306
datadir = <datapath>
tmpdir = <datapath>/tmp
When running mysqld I get the following error messages:
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.8
InnoDB: Using Linux native AIO
[ERROR] mysqld: Can't create/write to file '<datapath>/tmp/ib8dOkCX' (Errcode: 13)
InnoDB: Error: unable to create temporary file; errno: 13
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] mysqld: Can't create/write to file '<datapath>/aria_log_control' (Errcode: 13)
[ERROR] mysqld: Got error 'Can't create file' when trying to use aria control file '<datapath>/aria_log_control'
[ERROR] Plugin 'Aria' init function returned error.
[ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting
[Note] mysqld: Shutdown complete
I have made sure that the mysql user is the owner and has the proper permissions on the data and tmp directories.
When running mysqld as root, everything works just fine. When using the default tmpdir I still get the error when create/write to file /aria_log_control. Anyone who knows where I fail?
you should replace <datapath> with real path to data files which contains folder tmp

Can't restart Tomcat cartridge

Less than 2 weeks ago I posted a question here about a problem in my OpenShift cartridge because I suddenly couldn't restart it anymore: Error restarting Openshift MySQL cartridge
It was working fine and I didn't change anything on it but it simply stopped working. The only way I could "solve" the problem was deleting the gear and creating a new one, but now I have the same problem again :-(
This is really frustrating. I thought OpenShift was a realiable PaaS, but it looks like there's still a long way to go. I considering to buy the Enterprise plan, but I don't to pay for something that stops working out of nowhere.
By the way, here is the error log in case someone knows this time why this is happening:
Starting MySQL 5.5 cartridge
MySQL server failed to start:
140316 18:02:14 mysqld_safe Logging to '/var/lib/openshift/53104e375973cad496000022/mysql//log/mysql_error.log'.
140316 18:02:14 mysqld_safe Starting mysqld daemon with databases from /var/lib/openshift/53104e375973cad496000022/mysql/data/
140316 18:02:17 mysqld_safe mysqld from pid file /var/lib/openshift/53104e375973cad496000022/mysql/pid/mysql.pid ended
140316 18:02:14 mysqld_safe Starting mysqld daemon with databases from /var/lib/openshift/53104e375973cad496000022/mysql/data/
140316 18:02:15 [Note] Plugin 'FEDERATED' is disabled.
140316 18:02:15 InnoDB: The InnoDB memory heap is disabled
140316 18:02:15 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140316 18:02:15 InnoDB: Compressed tables use zlib 1.2.3
140316 18:02:15 InnoDB: Using Linux native AIO
140316 18:02:15 InnoDB: Warning: io_setup() failed with EAGAIN. Will make 5 attempts before giving up.
InnoDB: Warning: io_setup() attempt 1 failed.
InnoDB: Warning: io_setup() attempt 2 failed.
InnoDB: Warning: io_setup() attempt 3 failed.
InnoDB: Warning: io_setup() attempt 4 failed.
InnoDB: Warning: io_setup() attempt 5 failed.
140316 18:02:17 InnoDB: Error: io_setup() failed with EAGAIN after 5 attempts.
InnoDB: You can disable Linux Native AIO by setting innodb_use_native_aio = 0 in my.cnf
140316 18:02:17 InnoDB: Fatal error: cannot initialize AIO sub-system
140316 18:02:17 [ERROR] Plugin 'InnoDB' init function returned error.
140316 18:02:17 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140316 18:02:17 [ERROR] Unknown/unsupported storage engine: InnoDB
140316 18:02:17 [ERROR] Aborting
140316 18:02:17 [Note] /opt/rh/mysql55/root/usr/libexec/mysqld: Shutdown complete
140316 18:02:17 mysqld_safe mysqld from pid file /var/lib/openshift/53104e375973cad496000022/mysql/pid/mysql.pid ended
Failed to execute: 'control restart' for /var/lib/openshift/53104e375973cad496000022/mysql
Thanks!
Looks like you are having the same issue as this user: Can't add a MySQL cartridge on OpenShift
It's a mysql bug we are working on a work around.

Can't add a MySQL cartridge on OpenShift

I went to spin up a new application today and I'm running into some issues. I was able to add the PHP 5.4 cartridge just fine. I went to add a MySQL 5.5 cartridge and I received the following:
Starting MySQL 5.5 cartridge
MySQL server failed to start:
140320 03:05:46 mysqld_safe Logging to '/var/lib/openshift/532a883a4382ec501600043b/mysql//log/mysql_error.log'.
140320 03:05:46 mysqld_safe Starting mysqld daemon with databases from /var/lib/openshift/532a883a4382ec501600043b/mysql/data/
140320 03:05:51 mysqld_safe mysqld from pid file /var/lib/openshift/532a883a4382ec501600043b/mysql/pid/mysql.pid ended
140320 03:05:46 mysqld_safe Starting mysqld daemon with databases from /var/lib/openshift/532a883a4382ec501600043b/mysql/data/
140320 3:05:48 [Note] Plugin 'FEDERATED' is disabled.
140320 3:05:48 InnoDB: The InnoDB memory heap is disabled
140320 3:05:48 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140320 3:05:48 InnoDB: Compressed tables use zlib 1.2.3
140320 3:05:48 InnoDB: Using Linux native AIO
140320 3:05:48 InnoDB: Warning: io_setup() failed with EAGAIN. Will make 5 attempts before giving up.
InnoDB: Warning: io_setup() attempt 1 failed.
InnoDB: Warning: io_setup() attempt 2 failed.
InnoDB: Warning: io_setup() attempt 3 failed.
InnoDB: Warning: io_setup() attempt 4 failed.
InnoDB: Warning: io_setup() attempt 5 failed.
140320 3:05:51 InnoDB: Error: io_setup() failed with EAGAIN after 5 attempts.
InnoDB: You can disable Linux Native AIO by setting innodb_use_native_aio = 0 in my.cnf
140320 3:05:51 InnoDB: Fatal error: cannot initialize AIO sub-system
140320 3:05:51 [ERROR] Plugin 'InnoDB' init function returned error.
140320 3:05:51 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140320 3:05:51 [ERROR] Unknown/unsupported storage engine: InnoDB
140320 3:05:51 [ERROR] Aborting
140320 3:05:51 [Note] /opt/rh/mysql55/root/usr/libexec/mysqld: Shutdown complete
140320 03:05:51 mysqld_safe mysqld from pid file /var/lib/openshif /532a883a4382ec501600043b/mysql/pid/mysql.pid ended
Failed to execute: 'control start' for /var/lib/openshift/532a883a4382ec501600043b/mysql
I've seen one other question that seems similar, but was when attempting to restart their app.
Any idea how to fix this problem?
Looks like there is a bug (http://elenst.ru/mariadb/aio-max-nr-in-general-and-innodb-error-io_setup-failed-with-eagain-in-particular/) (http://bugs.mysql.com/bug.php?id=61575) we are looking into work arounds

Mysql did not start

I tried to restart mysql. However it did not restart. Here is the content of mysql.log:
131217 17:01:09 InnoDB: Starting shutdown...
131217 17:01:11 InnoDB: Shutdown completed; log sequence number 153229469
131217 17:01:11 [Note] /usr/libexec/mysqld: Shutdown complete
131217 17:01:11 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
131217 17:01:11 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
131217 17:01:11 [Note] Plugin 'FEDERATED' is disabled.
131217 17:01:11 InnoDB: The InnoDB memory heap is disabled
131217 17:01:11 InnoDB: Mutexes and rw_locks use GCC atomic builtins
131217 17:01:11 InnoDB: Compressed tables use zlib 1.2.3
131217 17:01:11 InnoDB: Using Linux native AIO
^G/usr/libexec/mysqld: Can't create/write to file '/tmp/ibsMvrkL' (Errcode: 13)
131217 17:01:11 InnoDB: Error: unable to create temporary file; errno: 13
131217 17:01:11 [ERROR] Plugin 'InnoDB' init function returned error.
131217 17:01:11 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
131217 17:01:11 [ERROR] Unknown/unsupported storage engine: InnoDB
131217 17:01:11 [ERROR] Aborting
Can any one help me to find the reason of this? In fact mysql was working before this time and it seems that it is not a regular error!!Please let me know if any other information is nedeed.
Thanks a lot
Have you checked if there is a problem about your disk partition. May be its out of space or have a problem. The error clearly shows the problem is caused by creating temp file failure. Rest is listed because InnoDB failed to initialize.
This error clearly mentioned that MySQL daemon unable to create a temporary file under /tmp directory.
Please check the permission of /tmp directory.
Your /tmp directory permission should have a sticky bit. below is the example for same.
drwxrwxrwt 3 root root 4.0K Feb 4 13:48 tmp