CentOS7安装MySQL
[root@localhost ~]# wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm[root@localhost ~]# yum -y install mysql57-community-release-el7-10.noarch.rpm[root@localhost ~]# yum
·
[root@localhost ~]# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
[root@localhost ~]# yum -y install mysql-community-release-el7-5.noarch.rpm
[root@localhost ~]# yum -y install mysql-community-server
[root@localhost ~]# systemctl start mysqld.service //启动mysql
[root@localhost ~]# mysql -uroot -p
[root@localhost ~]# SET PASSWORD = PASSWORD('a998998');//修改密码
[root@localhost ~]# grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option; //远程访问
[root@localhost ~]# vim /etc/my.cnf #添加 [mysqld] character_set_server=utf8 init_connect='SET NAMES utf8
[root@localhost ~]# service mysqld restart //重启mysql
接着可以用window 输入以下命令链接服务器mysql:
mysql -h ip -P 端口号 -u root -p
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
已为社区贡献1条内容
所有评论(0)