天天看点

ubuntu mysql文件夹权限,在Ubuntu上无法访问mysql文件夹

ubuntu mysql文件夹权限,在Ubuntu上无法访问mysql文件夹

I am trying to reset my MySQL root password following the official reference here.

In step #2, I have to do the following

Locate the .pid file that contains the server's process ID. The exact

location and name of this file depend on your distribution, host name,

and configuration. Common locations are /var/lib/mysql/,

/var/run/mysqld/, and /usr/local/mysql/data/. Generally, the file name

has an extension of .pid and begins with either mysqld or your

system's host name.

So I go to /var/lib/ and find the mysql folder. I double-clicked it, I got the following pop-up window:

The folder contents could not be displayed.

You do not have the permissions necessary to view the contents of "mysql".

I am pretty sure that I am indeed the system admin. Why is it like so and how to fix it?

解决方案

Start with working with the terminal/console as a root user.

Not a system expert - but it should get you somewhere:

Get into the ubuntu terminal/console

switch to the root user (sudo bash)

Then follow this one :

https://help.ubuntu.com/community/MysqlPasswordReset