Cannot login to MariaDB server with root account


You are trying to login to MariaDB with the root user, but even after resetting the password, it is still not possible to login.


It seems that certain MariaDB packages that come with Linux distributions use the unix_socket as the authentication method.

MariaDB [mysql]> SELECT user, host, plugin FROM user WHERE user='root';
| user | host      | plugin      |
| root | localhost | unix_socket |
1 row in set (0.00 sec)

Change the plugin as described here ( with the following:

MariaDB [mysql]> UPDATE mysql.user SET plugin = '' WHERE user = 'root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

Get a list of directories with user permissions


You want to run a command in a hosted server but you don’t have su permissions. There are directories that have different owners/permissions, so you would like to see them.


Use the tree command and save the output in a file if you have many directories:

tree -pufid /home/directory_to_check > /home/user/permissions.txt

taken from the answer here:

kubectl error: “The connection to the server localhost:8080 was refused – did you specify the right host or port?”


You want to use the kubectl to get your cluster information but you are getting the following error message

$ kubectl cluster-info
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
The connection to the server localhost:8080 was refused - did you specify the right host or port?


That could happen if you have already setup kubectl before or have used a different environment.

So you will need to first unset the environment variable KUBECONFIG with:


and then use the gcloud client to set your environment again:

$ gcloud container clusters get-credentials your_cluster_name --zone europe-west2-a --project your_project_name

So after this you should be able to use kubectl to get the cluster information

kubeconfig entry generated for your_cluster_name.

$ kubectl cluster-info
Kubernetes master is running at
GLBCDefaultBackend is running at
Heapster is running at
KubeDNS is running at
Metrics-server is running at