ubuntu server 16.04 mysql的默认密码

Default password of mysql in ubuntu server 16.04(ubuntu server 16.04 mysql的默认密码)
本文介绍了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的默认密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Difficulties installing mysql gem on Ubuntu(在 Ubuntu 上安装 mysql gem 的困难)
MySQL is extremely slow on EC2(MySQL 在 EC2 上非常慢)
preconfigure an empty password for mysql via debconf-set-selections(通过 debconf-set-selections 为 mysql 预配置一个空密码)
How can I pass a password from a bash script to aptitude for installing mysql?(如何将密码从 bash 脚本传递到 aptitude 以安装 mysql?)
How to edit the path in odbcinst -j(如何在odbcinst-j中编辑路径)
Trying to install innodb memcached plugin MySQL5.6.17 on ubuntu 14.04(尝试在ubuntu 14.04上安装Innodb Memcached插件MySQL5.6.17)