Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux安装配置Mysql,并进入生产环境 #10

Open
lvleihere opened this issue Jun 27, 2019 · 0 comments
Open

Linux安装配置Mysql,并进入生产环境 #10

lvleihere opened this issue Jun 27, 2019 · 0 comments

Comments

@lvleihere
Copy link
Owner

lvleihere commented Jun 27, 2019

啧啧啧centos6.5、7.5都玩过

介绍下还算靠谱的centos7.5的安装方法

  • 清理工作
    rpm -qa | grep mysql查看当前有哪些mysql包
    rpm -e --nodeps + 包名 进行卸载
    清除mysql-server yum remove mysql-server

  • 安装Mysql5.7

    • 下载源
      $: wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
    • 安装源
      $: yum localinstall mysql57-community-release-el7-7.noarch.rpm
    • 安装mysql-server
      $: yum install mysql-server
  • 查看版本
    $: mysql --version

  • 启动mysqld
    $: systemctl start mysqld

  • 查看临时密码
    $: grep 'temporary password' /var/log/mysqld.log

  • 修改密码
    $: mysql_secure_installation
    $: systemctl restart mysqld

  • 允许所有外网访问
    $: mysql -u root -p
    mysql>use mysql;

mysql> update user set host='%' where user='root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0
  • navicate链接试试
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant