Home > Database > Mysql Tutorial > ubuntu安装mysql遇到ROOT不能访问的有关问题

ubuntu安装mysql遇到ROOT不能访问的有关问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 16:23:59
Original
1095 people have browsed it

ubuntu安装mysql遇到ROOT不能访问的问题 使用ubuntu12.04安装mysql:sudo apt-get install mysql-server 然后使用命令mysql -u root -proot报出错误: 'Access denied for user 'root'@'localhost' (using password: YES)' 最开始的解决办法是使用了http://www

ubuntu安装mysql遇到ROOT不能访问的问题
使用ubuntu12.04安装mysql:sudo apt-get install mysql-server

然后使用命令mysql -u root -proot报出错误:'Access denied for user 'root'@'localhost' (using password: YES)'

最开始的解决办法是使用了http://www.cnblogs.com/songmingming/p/3150469.html里面的办法。

今天重新在另外的机器上安装,在安装过程中需要输入密码和确认密码,想起WINDDOW的安装模式下,就输入了root作为密码,安装完成以后,可以使用mysql登录和mysql -u root -proot登录,我觉得实际上是安装的问题,这样的问题的WINDOW上类似出现


安装mysql修改字符集 /etc/mysql/my.cnf

[client]
....
default-character-set=utf8


[mysqld]
.....
character-set-server=utf8
collation-server=utf8_general_ci
init-connect='SET NAMES utf8'
Copy after login


然后sudo start mysql即可
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