i can't reinstal after upgrade mysql can't startl

lungkao

Verified User
Joined
Jun 4, 2008
Messages
35
Code:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/usr/local/mysql/data/mysql.sock' (2 "No such file or directory")
Cannot find libnuma.so.1, installing using apt-get...
Reading package lists... Done
Building dependency tree
Reading state information... Done
libnuma-dev is already the newest version.
libnuma1 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 139 not upgraded.
mv: 'mariadb-10.1.35-linux-glibc_214-x86_64.tar.gz' and '/usr/local/mariadb-10.1.35-linux-glibc_214-x86_64.tar.gz' are the same file
Stopping mysqld ...
Ensuring local-infile is disabled for security reasons in MySQL configuration file...
Giving mysqld a few seconds to start up...
/usr/local/mysql/bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/usr/local/mysql/data/mysql.sock' (2 "No such file or directory") when trying to connect
FATAL ERROR: Upgrade failed
Restarting MySQL.

error report
Code:
2018-08-21  7:32:07 140269174278016 [Note] Starting crash recovery...
2018-08-21  7:32:07 140269174278016 [Note] Crash recovery finished.
2018-08-21  7:32:07 140268401587968 [Note] InnoDB: Dumping buffer pool(s) not yet started
2018-08-21  7:32:07 140269174278016 [ERROR] Can't open and lock privilege tables: Table './mysql/servers.MYI' is read only
2018-08-21  7:32:07 140269174278016 [Note] Server socket created on IP: '::'.
2018-08-21  7:32:07 140269174278016 [ERROR] Fatal error: Can't open and lock privilege tables: Table './mysql/user.MYI' is read only
180821 07:32:07 mysqld_safe mysqld from pid file /usr/local/mysql/data/mysqld.pid ended
 
Hello,

Something went wrong with an upgrade. It's hard to say what is it exactly. You might open a ticket with DA support so they could connect to your server and fix it, or you might need to hire somebody to fix it.

My guess is that the *tar.gz file was not downloaded fully, and/or it's corrupted. Hence the upgrade failed. As for the errors:

Code:
2018-08-21  7:32:07 140269174278016 [ERROR] Can't open and lock privilege tables: Table './mysql/servers.MYI' is read only
2018-08-21  7:32:07 140269174278016 [ERROR] Fatal error: Can't open and lock privilege tables: Table './mysql/user.MYI' is read only

it might mean you have another instance of MariaDB/MySQL still running and/or issues with permissions.


So make sure:

- you can unpack mariadb-10.1.35-linux-glibc_214-x86_64.tar.gz manually.
- you have no any instance of MariaDB/MySQL still running
- you have correct permissions under /usr/local/mysql/data/
- and your FS is not mounted as read-only

then try again to update the service with custombuild.
 
Faced the same today on Debian 8.

Changed datadir= in /etc/my.cnf from /home/mysql/ and moved databases to /var/lib/mysql/:

Code:
datadir                        = /var/lib/mysql/


and MariaDB on Debian started fine

p.s. Probably it is related to AppArmor.
 
Back
Top