原文:https://blog.csdn.net/u010026255/article/details/80062153 启动mysql服务:service mysqld start ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #修改加密规则 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '…
登录MySQL: mysql -u root -p db; 如需修改密码,第一次: mysqladmin -u root password NEWPASSWORD 已设置过: mysqladmin -u root -p 'oldpassword' password newpassword 执行以下命令开启远程访问限制 grant all privileges on *.* to 'root'@'192.168.0.1' identified by 'password' with gran…
一.安装 apt-get install mysql-server 二.本地连接 mysql默认开启了本地连接 直接通过mysql -uuser -p,然后输入密码访问 三.开启远程访问 3.1.创建一个与管理员同等权限的用户 grant all privileges on *.* to 'user'@'%' identified by 'password' with grant option 3.2.更新mysql权限 flush privileges 3.3.修改配置文件实现远程访问 vim…