启动 mysql 失败 Warning:The /usr/local/mysql/data directory is not owned by the 'mysql' or '_mysql'

Warning:The /usr/local/mysql/data directory is not owned by the ‘mysql‘ or ‘_mysql‘

这应该是某种情况下导致/usr/local/mysql/data的宿主发生了改变。

解决方法:打开终端运行 sudo chown -R mysql /usr/local/mysql/data 即可。

mac 下运行  sudo chown -R  _mysql:wheel  /usr/local/mysql/data 。

  -c 显示更改的部分的信息

  -f 忽略错误信息

  -h 修复符号链接

  -R 处理指定目录以及其子目录下的所有文件

  -v 显示详细的处理信息

启动 mysql 失败 Warning:The /usr/local/mysql/data directory is not owned by the 'mysql' or '_mysql'

时间: 2024-12-29 11:50:25

启动 mysql 失败 Warning:The /usr/local/mysql/data directory is not owned by the 'mysql' or '_mysql'的相关文章

启动mysql 失败,“Warning:The /usr/local/mysql/data directory is not owned by the 'mysql' or '_mysql' ”

一.Mac OS X的升级或其他原因可能会导致MySQL启动或开机自动运行时 在MySQL操作面板上会提示“Warning:The /usr/local/mysql/data directory is not owned by the 'mysql' or '_mysql' ”, 这应该是某种情况下导致/usr/local/mysql/data的宿主发生了改变, 只需要运行“sudo chown -R mysql /usr/local/mysql/data”即可 mac 下面运行 “sudo c

mysql: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: UP

Error Symptom: when you run $mysql -u root -p command in the linux you get an error message ” mysql: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: UP” Solution: Step 1: Login as root Step 2: Go to folder path #cd/usr/local/l

mysql 初始化报错 /usr/local/mysql/bin/mysqld:error while loading shared libraries :libaio.so.1

安装mysql在初始化的时候,出现/usr/local/mysql/bin/mysqld:error while loading shared libraries:libaio.so.1 :cannot open shared object file:NO such file or directory 解决方法: <P>type the following</P> <P>apt-get install libaio1 libaio-dev</P> <P

解决MAC下PHP连接MYSQL错误Warning: mysql_connect(): No such file or directory in conn.php

今天在mac上用php去连接mysql数据库,出现了 mac PHP Warning:  mysql_connect(): [2002] No such file... 详细例如以下所看到的: DirkMacBook:vote Dirk$ phpunit MyTest.php  Warning: mysql_connect(): No such file or directory in /Applications/XAMPP/xamppfiles/htdocs/myvote/vote/conn.

启动Memcached报错:/usr/local/memcached/bin/memcached: error while loading shared libraries: libevent-2.1.so.6: cannot open shared object file: No such file or directory

1.查找文件放在哪里 sudo find / -name libevent-2.1.so.6 发现放在/usr/local/lib/libevent-2.1.so.6下. 2.创建软链接 sudo ln -s /usr/local/lib/libevent-2.1.so.6 /usr/lib/libevent-2.1.so.6 参考: https://my.oschina.net/itblog/blog/633074

mysql报错--initialize specified but the data directory has files in it. Aborting.

初始化msyql时出现报错 C:\mysql-5.7.19-winx64> C:\mysql-5.7.19-winx64\bin\mysqld --initialize-insecure2019-12-25T01:59:21.234788Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see

MySQL启动时必需到usr/local/mysql目录的问题解决方法

之前我安装MySql数据库的时候,由于我的MySQL不是安装在标准的/usr/local/mysql目录,而是安装在/usr/local/development/mysql-5.5.25目录,导致在启动MySQL服务时报告找不到/usr/local/mysql目录的错误.最后我就创建了符号链/usr/local/mysql链接到/usr/local/development/mysql-5.5.25,解决了服务启动不了的问题. 为什么会出现此问题呢?我们可以打开mysql.server脚本文件,里

mysqld_safe启动报错 mysqld_safe The file /usr/local/mysql/bin/mysqld does not exist or is not executable

报错(如下),但是使用mysqld直接启动没有问题. 150718 00:03:38 mysqld_safe Logging to '/var/log/mysqld.log'. 150718 00:03:38 mysqld_safe The file /usr/local/mysql/bin/mysqld does not exist or is not executable. Please cd to the mysql installation directory and restart t

Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid).

? [[email protected] ~]# cd /usr/local/mysql ? [[email protected] mysql]# chown -R mysql.mysql . [[email protected] mysql]# su - mysql [[email protected] ~]$ cd /usr/local/mysql [[email protected] mysql]$ scripts/mysql_install_db ??