标签:class 刷新 获取 技术 file ice git etc client
sudo adduser weirwei
sudo vim /etc/sudoers
su weirwei
自此以后,所有操作都在自己的用户下执行
sudo apt-get install openjdk-8-jdk
sudo apt-get install mysql-server-5.7
获取 MySQL 默认用户名和密码
sudo less /etc/mysql/debian.cnf
找到用户名和密码后登录 MySQL
update mysql.user set authentication_string=password(‘你的密码‘) where user=‘root‘ and host=‘localhost‘;
update mysql.user set plugin=‘mysql_native_password‘;
flush privileges;
然后重启 MySQL 服务
sudo service mysql restart
登录 MySQL 查看默认字符编码
mysql> show variables like ‘character_set_%‘;
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)
打开 /etc/mysql/mysql.conf.d/mysqld.cnf
,在末尾添加 character-set-server=utf8
顺便把这个bind-address
注释了(这一步是为了能够远程连接数据库)
接着重启 MySQL 服务
再次查看默认字符表
mysql> show variables like ‘character_set_%‘;
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.01 sec)
如果 root 对应的 host 是 localhost
改成 %
update user set host = ‘%‘ where user=‘root‘;
然后flush privileges;
退出 mysql
在默认的安全组规则中新增入方向规则,开放 3306 端口
刷新一下
配置完后尝试远程连接服务器
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
sudo usermod -aG docker weirwei
sudo service docker restart
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
apt-get install zsh
chsh -s /bin/zsh
标签:class 刷新 获取 技术 file ice git etc client
原文地址:https://www.cnblogs.com/weirwei/p/14221627.html