Archive

Archive for April, 2014

ORA-28040: No matching authentication protocol

April 17, 2014 Leave a comment

I just install 12C1 database. When the old client 8 connected to the database, it showed the error below.

ORA-28040: No matching authentication protocol

Fixed:

Add the parameter below into $ORACLE_HOME/network/admin/sqlnet.ora. This set SQL

SQLNET.ALLOWED_LOGON_VERSION=8

 

Advertisements
Categories: Uncategorized

mysql_secure_installation showed ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)

April 4, 2014 Leave a comment

Today, I secured the mysql db with the mysql_secure_installation. It showed the following errors.

root@slave1 mysql]# ./bin/mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we’ll need the current
password for the root user.  If you’ve just installed MySQL, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
Enter current password for root (enter for none):
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
Enter current password for root (enter for none):

Caused:

Since I have set the mysqld socket to /opt/mysql/run/mysqld.sock in /etc/my.cnf as the following, not the default path /tmp/mysql.sock.

[mysqld]
# basic setting
datadir = /opt/mysql/data
tmpdir = /opt/mysql/tmp
socket = /opt/mysql/run/mysqld.sock

Fixed:

I added one more line “/opt/mysql/run/mysqld.sock” into /usr/local/mysql/bin/mysql_secure_installation at make_config section as the following. Then the problem got fixed.

sub make_config {
my $password = shift;

my $esc_pass = basic_single_escape($rootpass);
write_file($config,
“# mysql_secure_installation config file”,
“[mysql]”,
“user=root”,
“password=’$esc_pass'”,
“connect-expired-password”,
“socket=/opt/mysql/run/mysqld.sock”);
}

 

 

Categories: mySQL troubleshooting