django 安装
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'gcc' failed with exit status 1
brew install openssl
echo "export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/" >>~/.bashrc
Modification of mysql_config resolves these issues as follows.
Change
# on macOS, on or about line 112:
# Create options
libs="-L$pkglibdir"
libs="$libs -l "
to
# Create options
libs="-L$pkglibdir"
libs="$libs -lmysqlclient -lssl -lcrypto"
mysql 8 和之前的加密方式不同, 创建授权用户也不同
mysql8.0无法给用户授权或提示You are not allowed to create a user with GRANT、for the right syntax to use near 'identified by xxx'
的问题
提示意思是不能用grant创建用户,mysql8.0以前的版本可以使用grant在授权的时候隐式的创建用户,8.0以后已经不支持,所以必须先创建用户,然后再授权,命令如下:
mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'Hadoop3!';
Query OK, 0 rows affected (0.04 sec)
mysql> grant all privileges on . to 'root'@'%';
Query OK, 0 rows affected (0.03 sec)
另外,如果远程连接的时候报plugin caching_sha2_password could not be loaded这个错误,可以尝试修改密码加密插件:
mysql> alter user 'root'@'%' identified with mysql_native_password by 'Hadoop3!';
"Authentication plugin ‘caching_sha2_password’ cannot be loaded
https://stackoverflow.com/questions/49194719/authentication-plugin-caching-sha2-password-cannot-be-loaded