MySQL Forums
Forum List  »  Newbie

Unuable to log into socket: /var/run/mysqld/mysqld.sock
Posted by: Ibrahim Girit
Date: May 06, 2016 09:52AM

Hello,

I have been trying to understand the performance of my MySql server. I run tuning-primer script and get an error

- FINAL LOGIN ATTEMPT FAILED -
Unable to log into socket: /var/run/mysqld/mysqld.sock

But I can login into MySql fine. See below. The my.cnf or (.my.cnf) file in /root and /home/user is

root@Ubuntu-1:/home/usert# cat my.cnf
[client]
user=root
password=myPass
socket=/var/run/mysqld/mysqld.sock

What is wrong? How can I fix it? My OS is Ubunto v16.04 and MySql version is 5.7.12. Thank you.

---------------------

root@Ubuntu-1:/home/user# ./tuning-primer.sh

Using login values from ~/.my.cnf
- INITIAL LOGIN ATTEMPT FAILED -
Testing for stored webmin passwords:
None Found
Could not auto detect login info!
Found potential sockets: /var/run/mysqld/mysqld.sock
Using: /var/run/mysqld/mysqld.sock
Would you like to provide a different socket?: [y/N] N
Do you have your login handy ? [y/N] : y
User: root
Password: myPass

Would you like me to create a ~/.my.cnf file for you? [y/N] : y

~/.my.cnf already exists!

Replace ? [y/N] : y
- FINAL LOGIN ATTEMPT FAILED -
Unable to log into socket: /var/run/mysqld/mysqld.sock

root@Ubuntu-1:/home/user# mysql -u root -pmyPass
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 22719
Server version: 5.7.12-0ubuntu1 (Ubuntu)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| owncloud |
| performance_schema |
| phpmyadmin |
| sys |
+--------------------+
6 rows in set (0.01 sec)

mysql> quit

Options: ReplyQuote


Subject
Written By
Posted
Unuable to log into socket: /var/run/mysqld/mysqld.sock
May 06, 2016 09:52AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.