yum list mysql
yum install mysql
yum list mysql-server
启动服务
service mysqld start
/etc/init.d/mysqld start
mysql -u root -p
/etc/init.d/mysqld stop
修改密码
mysqladmin -uroot -p password 'newpassword'
安装时出现
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
解决办法:破解mysql密码
#> service mysqld stop
#>mysqld_safe --skip-grant-tables &
输入 mysql -uroot -p 回车进入
>use mysql;
> update user set password=PASSWORD("newpass")where user="root";
更改密码为 newpassord
> flush privileges; 更新权限
> quit 退出
service mysqld restart
mysql -uroot -p新密码进入
yum install mysql
yum list mysql-server
启动服务
service mysqld start
/etc/init.d/mysqld start
mysql -u root -p
/etc/init.d/mysqld stop
修改密码
mysqladmin -uroot -p password 'newpassword'
安装时出现
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
解决办法:破解mysql密码
#> service mysqld stop
#>mysqld_safe --skip-grant-tables &
输入 mysql -uroot -p 回车进入
>use mysql;
> update user set password=PASSWORD("newpass")where user="root";
更改密码为 newpassord
> flush privileges; 更新权限
> quit 退出
service mysqld restart
mysql -uroot -p新密码进入