Home > Database > Mysql Tutorial > Lnmp下修改mysql根密码

Lnmp下修改mysql根密码

WBOY
Release: 2016-06-07 16:34:26
Original
1057 people have browsed it

今天帮兄弟安装了一个新的lnmp环境,安装后才发现mysql的根密码不是兄弟想要的密码,如是在建站前把根密码快快改了。 首先登陆phpmyadmin,选择mysql数据库,之后选sql选项卡,输入如下代码到命令框,之后点右下角的执行按钮,代码如下: update user set pas

今天帮兄弟安装了一个新的lnmp环境,安装后才发现mysql的根密码不是兄弟想要的密码,如是在建站前把根密码快快改了。

首先登陆phpmyadmin,选择mysql数据库,之后选sql选项卡,输入如下代码到命令框,之后点右下角的执行按钮,代码如下:

update user set password=password('新密码') where User='root'
Copy after login

再次,修改/home/wwwroot/phpmyadmin/libraries/config.default.php,把$cfg['Servers'][$i]['password'] = ' '修改成$cfg['Servers'][$i]['password'] = '新密码'

最后,重启lnmp。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template