Centos系统下安装mysql的方法:
1、获得rpm安装文件
rpm -ivh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
2、安装rpm
yum install mysql-server –y
3、启动mysql服务
service mysqld start
4、初始化mysql
mysql_secure_installation
5、出现如下信息,选择自己需要的,输入Y或者N
Enter current password for root (enter for none):
Set root password? [Y/n]
Remove anonymous users? [Y/n]
Disallow root login remotely? [Y/n]
Remove test database and access to it? [Y/n]
Reload privilege tables now? [Y/n]
6、登录mysql进行测试
mysql -uroot -p(默认密码为空)
Centos Mysql安装方法
最新推荐文章于 2021-02-03 13:28:10 发布