Default password of mysql in ubuntu server 16.04(ubuntu server 16.04 mysql的默认密码)
问题描述
我已经安装了 ubuntu 16.04 服务器.mysql服务器默认安装在里面.当我尝试使用 mysql -u root -p 访问 mysql 时,我无法登录到 mysql,因为我没有密码.有没有默认密码?
I have installed ubuntu 16.04 server. Mysql server was installed by default in it. When I am trying to access the mysql with mysql -u root -p, I am unable to log in to mysql because I dont have the password. Is there any default password?
我也试过 --skip-grant-tables,即使这样也行不通.即使尝试仅使用 mysql -u root 登录也是失败的.
I have also tried with --skip-grant-tables, even this does not work. Even trying to log in with just mysql -u root is a failure.
推荐答案
这就是你要找的:sudo mysql --defaults-file=/etc/mysql/debian.cnf
基于 Debian 的 Linux 上的 MySql 通常使用带有凭据的配置文件.
This is what you are looking for:
sudo mysql --defaults-file=/etc/mysql/debian.cnf
MySql on Debian-base Linux usually use a configuration file with the credentials.
这篇关于ubuntu server 16.04 mysql的默认密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:ubuntu server 16.04 mysql的默认密码
基础教程推荐
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- 是否可以执行按位分组功能? 2021-01-01
- 在 SQL 中连接多个表 2021-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
- 无法解决整理冲突 2021-01-01
