Centos Mysql安装方法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/IUNIQUE/article/details/80838277

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(默认密码为空)

猜你喜欢

转载自blog.csdn.net/IUNIQUE/article/details/80838277