Ubuntu快速安装并设置MySQL8.0
https://img-blog.csdnimg.cn/direct/c751a676f760453ab834b1c61aa77246.gif#pic_center一. 安装MySQL8.0
1.1更新软件包
sudo apt-get update
1.2安装MySQL8.0
sudo apt-get install mysql-server-8.0
1.3查看MySQL运行状态
systemctl status mysql.service
二. 设置MySQL8.0
2.1 修改设置文件
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
注释
#bind-address=127.0.0.1
#mysqlx-bind-address=127.0.0.1
添加
character_set_server=utf8
2.2登录MySQL
sudo mysql -u root -p
2.3设置长途登录账号密码
use mysql;
# 创建用户
create user 'zhangsan'@'%' identified by '123456';
# 授权
GRANT ALL PRIVILEGES ON *.* TO 'zhangsan'@'%' WITH GRANT OPTION;
# 刷新权限
FLUSH PRIVILEGES;
# 退出MySQL
>quit
sudo service mysql restart
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]