洛阳北大青鸟:Linux下MySQL的管理与配置
发布时间:2013-04-13 15:10:51 点击:0
洛阳北大青鸟导读:1. MySQL服务的启动:service mysqld start2. 进入MySQL:mysql3. 退出MySQL:exit 或者\q4. 初次登录并设置密码:$ mysql -u rootmysql> SET password=PASSWORD( 'password' );5. 再次登...
1. MySQL服务的启动:service mysqld start
2. 进入MySQL:mysql
3. 退出MySQL:exit 或者\q
4. 初次登录并设置密码:
$ mysql -u root
mysql> SET password=PASSWORD( 'password' );
5. 再次登录命令:mysql -u root -p
6. 查询用户密码:select user, host, password from mysql.user;
7. 更改密码:
> UPDATE user SET password=PASSWORD( 'new password' ) WHERE user='user name';
> FLUSH PRIVILEGES;
> QUIT
8. 更改密码二:
> SET PASSWORD FOR user name=PASSWORD('new password');
> QUIT