Blogger Information
Blog 17
fans 0
comment 0
visits 23519
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Linux(centos)系统安装MySQL
星辰幽梦
Original
776 people have browsed it

Linux系统安装MySQL

1 MySQL8的安装

  • 1、在 root 目录下,安装 mysql 和 mysql-devel

    yum install mysql
    yum install mysql-devel

  • 2、安装mysql-server

    wget http://dev.mysql.com/get/mysql80-community-release-el7-5.noarch.rpm
    rpm -ivh mysql80-community-release-el7-5.noarch.rpm
    yum install mysql-community-server

  • 3、重启mysql服务

    service mysqld restart

  • 4、查看 Mysql 运行状态

    service mysqld status

  • 5、查看初始密码

    grep ‘password’ /var/log/mysqld.log

  • 6、修改密码

    mysql -u root -p —登录mysql,并输入初始密码
    alter user ‘root’@’localhost’ identified by ‘这里填你要的密码’;(
    填写密码的时候满足8位并且尽量是混合密码(大小写英文、下划线、数字))

  • 7、设置允许远程登录

    1、先重新登录
    执行 mysql -u root -p
    2、执行 use mysql;
    3、执行 update user set host = ‘%’ where user = ‘root’;
    4、执行 FLUSH PRIVILEGES;

  • 8、开始使用

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post