yum -y install mysql-server ,系统自动下载和安装Mysql的,
chkconfig – – add mysqld 在服务清单中添加mysql服务
service mysqld start 服务启动
mysqladmin -u root password ‘newpassword’ 更改密码
mysql -u root -p mysql> DROP DATABASE test; 删除test数据库
mysql> DELETE FROM mysql.user WHERE user = ”; 删除匿名帐户
mysql> FLUSH PRIVILEGES; 重载权限
添加mysql用户:
GRANT ALL PRIVILEGES ON my_db.* TO ‘user’@’localhost’ IDENTIFIED BY ‘password’;
centos下yum安装mysql
未经允许不得转载:优惠吧 » centos下yum安装mysql
评论前必须登录!
注册