Ubuntu18.04 安装MySQL没有提示输入初始密码,重设root密码
时间: 2019-10-10来源:OSCHINA
前景提要
【围观】麒麟芯片遭打压成绝版,华为亿元投入又砸向了哪里?>>>
在Ubuntu18.04 中安装MySQL 过程中没有出现提示输入密码环节,可以使用以下方法重设MySQL的root密码。
使用安装时的默认密码登录MySQL 安装时默认生成的默认账户在 /etc/mysql/debian.cnf:
 $ mysql -udebian-sys-maint -p   密码是debian.cnf中的password,每个人的密码不一样,根据自己系统中debian.cnf的密码输入。
修改root 密码 登入MySQL后,执行以下命令:
 use mysql; update mysql.user set authentication_string=password('root') where user='root' and Host ='localhost'; update user set plugin="mysql_native_password"; flush privileges; quit; 重启MySQL服务

科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行