Home > Database > Mysql Tutorial > body text

liunx下安装mysql没有初始密码的解决方法_MySQL

WBOY
Release: 2016-06-01 13:30:32
Original
1432 people have browsed it

bitsCN.com

#/etc/init.d/mysql stop
#cd /usr/local/mysql
#mysqld_safe --user=mysql --skip-grant-tables --skip-networking &  //执行此命令后,即可无须密码进入mysql。

然后,修改root密码。


#mysql -u root mysql
mysql > UPPATE user SET password=PASSWORD('newpassword') where USER='root';
mysql > FLUSH PRIVILEGES;
mysql > quit ;
#/etc/init.d/mysql restart
#mysql -u root -p

bitsCN.com
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 [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!