Home  >  Article  >  Database  >  mysql tips_MySQL

mysql tips_MySQL

WBOY
WBOYOriginal
2016-05-31 08:47:571001browse

另一篇文章:Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'问题的解决

这种问题需要强行重新修改密码,方法如下:

/etc/init.d/mysql stop   (service mysqld stop )
/usr/bin/mysqld_safe --skip-grant-tables
另外开个SSH连接
[root@localhost ~]# mysql
mysql>use mysql
mysql>update user set password=password("123456") where user="root";
mysql>flush privileges;
mysql>exit

pkill -KILL -t pts/0 可将pts为0的**用户(之前运行mysqld_safe的用户窗口)强制踢出

正常启动 MySQL:/etc/init.d/mysql start   (service mysqld start)


ubuntu install

sudo apt-get install  mysql-server

Statement:
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