linux下yum安装MySQL
安装mysql[root@master1 ~]# yum install mysql安装mysql服务源码[root@master1 ~]# rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm安装mysql服务[root@master1 ~]# yum install mysql-server安装My
·
安装mysql
[root@master1 ~]# yum install mysql
安装mysql源
[root@master1 ~]# rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
安装mysql服务
[root@master1 ~]# yum install mysql-server
安装MySQL依赖
[root@master1 ~]# yum install mysql-devel
启动mysql并查看
[root@master1 ~]# systemctl start mysql
[root@master1 ~]# systemctl status mysql
进入MySQL中
由于是新的所以没有账号秘密
设置mysql密码
输入是啥秘密它会默认就是这个秘密,为了保险起见还是设置一下
mysql> use mysql;
mysql> set password for root@localhost = password('123456789');
或
mysql> update user set authentication_string=password("123456789") where user='root';
刷新权限
mysql> FLUSH PRIVILEGES;
尝试登录
远程访问 mysql 开放所有权限设置
mysql> GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "123456789";
刷新权限
更多推荐
已为社区贡献2条内容
所有评论(0)