centos中mysql安装教程
时间: 2023-11-12 22:57:39 浏览: 88
Centos下Mysql安装图文教程
CentOS中安装MySQL的步骤如下:
1. 更新系统软件包:`sudo yum update`
2. 安装MySQL:`sudo yum install mysql-server`
3. 启动MySQL服务:`sudo service mysqld start`
4. 设置MySQL开机自启:`sudo chkconfig mysqld on`
5. 进入MySQL命令行:`mysql -u root -p`
6. 修改root用户密码:`ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';`
7. 退出MySQL命令行:`exit`
阅读全文