【学习记录】环境配置时出现的一些坑

【学习记录】环境配置时出现的一些坑,第1张

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档

文章目录
  • 前言
  • 一、anaconda设置清华源
  • 二、pip设置清华源
  • 三、powershell禁止执行脚本解决
  • 四、MySQL使用
    • MySQL初始化和修改默认密码
    • Navicat for MySQL链接出现1251错误问题解决
  • 总结


前言

我是菜鸡,记不住代码。


一、anaconda设置清华源 代码如下:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ 
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ 
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ 
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/peterjc123/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes

二、pip设置清华源 代码如下:
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

 

三、powershell禁止执行脚本解决 以管理员身份打开powershell执行下面代码:
set-ExecutionPolicy RemoteSigned

 

四、MySQL使用  MySQL初始化和修改默认密码   cd到bin目录执行下面代码:        
mysqld --initialize --console
记住root@localhost:初始密码 继续执行:
mysqld install
net start mysql
MySQL修改默认密码 首先登录数据库:
mysql -u root -p
然后输入上面的默认密码 再输入下面代码修改密码:
set password for root@localhost = password('123'); 

Navicat for MySQL链接出现1251错误问题解决 Navicat for MySQL 连接 Mysql 8.0.11 出现1251- Client does not support authentication protocol 错误 先登录数据库 mysql -u root -p 再使用下面代码把mysql用户登录密码还原成mysql_native_password:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '自定义的密码';

总结

我真的是菜鸡,一个都没记住。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/759461.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-01
下一篇2022-05-01

发表评论

登录后才能评论

评论列表(0条)

    保存