内容简介:下载安装软件源:安装成功后重启mysql服务初次安装mysql,root账户没有密码
下载安装软件源:
# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm # rpm -ivh mysql-community-release-el7-5.noarch.rpm # yum install mysql-community-server
安装成功后重启 mysql 服务
service mysqld restart
初次安装mysql,root账户没有密码
# mysql -u root
设置密码:
mysql> set password for 'root'@'localhost'=password('password');
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
设置允许远程连接
mysql> grant all privileges on *.* to root@'%'identified by 'password'; Query OK, 0 rows affected (0.00 sec) mysql>
如果允许root账号远程连接要对系统数据库的root账户设置远程访问的密码,与本地的root访问密码并不冲突。
grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option; #123456为你需要设置的密码
参考连接:
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
The Four
Scott Galloway / Portfolio / 2017-10-3 / USD 28.00
NEW YORK TIMES BESTSELLER USA TODAY BESTSELLER Amazon, Apple, Facebook, and Google are the four most influential companies on the planet. Just about everyone thinks they know how they got there.......一起来看看 《The Four》 这本书的介绍吧!