ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysq

youyoums

Verified User
Joined
Jul 21, 2011
Messages
37
When i want to update mariadb 10.1.16 to 10.1.17 in centos 7.2(1511),there are some errors:
[CODE[root@server custombuild]# ./build mariadb
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory")
Found /usr/local/directadmin/custombuild/mysql/MariaDB-10.1.17-centos6-x86_64-client.rpm
Found /usr/local/directadmin/custombuild/mysql/MariaDB-10.1.17-centos6-x86_64-devel.rpm
Found /usr/local/directadmin/custombuild/mysql/MariaDB-10.1.17-centos6-x86_64-server.rpm
Found /usr/local/directadmin/custombuild/mysql/MariaDB-10.1.17-centos6-x86_64-shared.rpm
Found /usr/local/directadmin/custombuild/mysql/MariaDB-10.1.17-centos6-x86_64-common.rpm
Found /usr/local/directadmin/custombuild/mysql/MariaDB-10.1.17-centos6-x86_64-compat.rpm
Installing dependencies...
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.linode.com
* extras: mirrors.linode.com
* updates: mirrors.linode.com
Package perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 already installed and latest version
Package 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 already installed and latest version
Package perl-DBI-1.627-4.el7.x86_64 already installed and latest version
Package lsof-4.87-4.el7.x86_64 already installed and latest version
Package 2:nmap-6.40-7.el7.x86_64 already installed and latest version
No package compat-readline5 available.
Nothing to do
Installing libjemalloc...
Found /usr/local/directadmin/custombuild/mysql/jemalloc-3.6.0-1.el6.x86_64.rpm
Found /usr/local/directadmin/custombuild/mysql/jemalloc-devel-3.6.0-1.el6.x86_64.rpm
warning: /usr/local/directadmin/custombuild/mysql/jemalloc-3.6.0-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:jemalloc-3.6.0-1.el6 ################################# [ 50%]
2:jemalloc-devel-3.6.0-1.el6 ################################# [100%]
Installing galera...
Found /usr/local/directadmin/custombuild/mysql/galera-25.3.17-1.rhel6.el6.x86_64.rpm
warning: /usr/local/directadmin/custombuild/mysql/galera-25.3.17-1.rhel6.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:galera-25.3.17-1.rhel6.el6 ################################# [100%]
Stopping mysqld ...
Updating MariaDB 10.1.17 to 10.1.17
warning: MariaDB-10.1.17-centos6-x86_64-client.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:MariaDB-compat-10.1.17-1.el6 ################################# [ 17%]
2:MariaDB-common-10.1.17-1.el6 ################################# [ 33%]
3:MariaDB-client-10.1.17-1.el6 ################################# [ 50%]
4:MariaDB-server-10.1.17-1.el6 ################################# [ 67%]
5:MariaDB-devel-10.1.17-1.el6 ################################# [ 83%]
6:MariaDB-shared-10.1.17-1.el6 ################################# [100%]
Failed to execute operation: Invalid argument
mv: '/etc/systemd/system/mysql.service' and '/etc/systemd/system/mysqld.service' are the same file
Failed to execute operation: Invalid argument
Ensuring local-infile is disabled for security reasons in MySQL configuration file...
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
Giving mysqld a few seconds to start up...
Version check failed. Got the following error when calling the 'mysql' command line client
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory")
FATAL ERROR: Upgrade failed
/usr/bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory") when trying to connect
cp: '/usr/lib/libmysqlclient.so' and '/usr/lib/mysql/libmysqlclient.so' are the same file
Restarting MySQL.
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
[root@server custombuild]#
][/CODE]
 
My os is centos 7.2,i don't know why download MariaDB-10.1.17-centos6-x86_64,i an crazy
 
Because MySQL doesn't exist for CentOS 7.

On CentOS 7 you can only install MariaDB, that's normal.

Have you tryed to reinstall it again?

Regards
 
Back
Top