1. 安装mysql 服务器端:
yum install mysql-server
yum install mysql-devel
2. 安装mysql客户端:
yum install mysql
3. 启动mysql服务:
service mysqld start或者/etc/init.d/mysqld start
停止:
service mysqld stop
重启:
service mysqld restart
4. 创建root管理员:
mysqladmin -u root password 123456
5.登陆
mysql -uroot -p123456
6.root权限
GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "123456"; flush privileges;
设置mysql的开机启动
chkconfig --add mysqld chkconfig mysqld on
原文地址:https://www.cnblogs.com/feifeicui/p/10088529.html
时间: 2024-11-01 14:47:47