Ubuntu 安装 MySQL 指南 #18
onnttf
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
安装步骤
安装 MySQL APT 配置包
访问 MySQL APT Repository,找到最新的配置包
点击
Download
按钮并复制No thanks, just start my download
的下载链接使用以下命令下载并安装配置包:
在配置界面中选择
MySQL 5.7
版本,按OK
确认安装 MySQL
验证安装
MySQL
安装完成后会自动启动。使用以下命令检查状态:常用服务命令:
安全配置
修改 root 密码
创建新用户
优化配置
设置
UTF-8
字符集编辑
/etc/mysql/mysql.conf.d/mysqld.cnf
:配置远程访问
编辑配置文件
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf # 注释掉 bind-address = 127.0.0.1
授权远程访问
重启
MySQL
:常见问题排查
无法远程连接
bind-address
设置字符集问题
SHOW VARIABLES LIKE 'character%';
检查配置参考资料
Beta Was this translation helpful? Give feedback.
All reactions