

免费资源网 – https://freexyz.cn/
1. 先检查系统是否装有MySQL[root@localhost ~]#yum list installed mysql*[root@localhost ~]#rpm –qa|grep mysql*
2. 查看有没有安装包
[root@localhost ~]#yum list mysql*
3. 安装mysql客户端
[root@localhost ~]yum install mysql
4. 安装mysql服务端
[root@localhost ~]#yum install mysql-server[root@localhost ~]#yum install mysql-devel
5. 在/etc/my.cnf 文件中加入默认字符集
[root@localhost ~]#vim /etc/my.cnf
7. 设置开机启动mysql服务
[root@localhost ~]# chkconfig –add mysqld
8. 创建root用户 密码为123456
mysqladmin –u root password 123456
[root@localhost ~]# mysqladmin -u root password 1234569. 连接mysql
[root@localhost ~]# mysql -u root -p –输入密码123456
10. 设置远程访问权限
mysql> use mysql mysql> GRANT ALL PRIVILEGES ON *.* TO ‘admin’@’%’IDENTIFIED BY ‘admin’ WITH GRANT OPTION; –第一个admin为用户名,第二个admin为密码,%表示所有的电脑都可以链接 mysql> flush privileges; –设置立即生效
11.使用navcat连接mysql

大功告成。。。
免费资源网 – https://freexyz.cn/
© 版权声明
THE END
暂无评论内容