我已经安装了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/debianf 基于Debian的Linux上的MySql通常使用带有凭据的配置文件.
This is what you are looking for: sudo mysql --defaults-file=/etc/mysql/debianf MySql on Debian-base Linux usually use a configuration file with the credentials.
更多推荐
ubuntu服务器16.04中mysql的默认密码
发布评论