Domain, hosting, vps giá rẻ
Kết quả 1 đến 1 của 1

Chủ đề: Hương dẫn cài đặt Remote MYSQL - Instructions for installing Remote MYSQL

  1. #1
    nghiatichxanh1992's Avatar
    Bài viết
    5,038
    Cấp độ
    Bang hội
    Tiếu Ngạo
    Tu luyện
    Độ kiếp Hư Thần
    Giới tính
    Con trai
    Join Date
    Jun 2012
    Đến từ
    Hà Giang
    Tuổi
    31
    Danh vọng
    10
    Điện thoại
    0367790762

    Hương dẫn cài đặt Remote MYSQL - Instructions for installing Remote MYSQL

    I - Editing the Defaults File:
    - edit file: /etc/my.cnf.d/server.cnf
    Mã:
     [mysqld]
        ...
        skip-networking
        ...
        bind-address = <some ip-address>
        ...
    to
    Mã:
     [mysqld]
        ...
        #skip-networking
        skip-networking=0
        ...
        #bind-address = <some ip-address>
        skip-bind-address
        ...
    - Restart MySQL:
    systemctl restart mariadb

    - You can now verify the MariaDB listening status with the following command:
    netstat -ant | grep 3306

    - If everything is fine, you should get the following output:
    tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN

    - Now, the MariaDB server is setup to listen to all IP addresses.


    II - Grant Access to a User from a Remote System:
    - First, login to the MariaDB shell with the following command:
    mysql -u root -p

    CREATE USER 'root'@'12.34.56.78' IDENTIFIED BY 'password123456';
    GRANT ALL ON *.* TO 'root'@'12.34.56.78';
    GRANT ALL PRIVILEGES ON *.* TO 'root'@'12.34.56.78' IDENTIFIED BY 'password123456' WITH GRANT OPTION;
    FLUSH PRIVILEGES;
    SELECT User,Host FROM mysql.user;


    III - Port 3306 is Configured in Firewall
    - One more point to consider whether the firwall is configured to allow incoming request from remote clients:
    - On RHEL and CentOS 7, it may be necessary to configure the firewall to allow TCP access to MySQL from remote hosts. To do so, execute both of these commands:
    firewall-cmd --add-port=3306/tcp
    firewall-cmd --permanent --add-port=3306/tcp


    - Test remote MYSQL on VPS 12.34.56.78:
    mysql -u root -h 111.222.333.444 -p

    Explore more: https://mariadb.com/kb/en/configurin...client-access/
    Lần sửa cuối bởi nghiatichxanh1992, ngày 06/12/2020 lúc 15:00.
    Diễn đàn chia sẻ kiến thức điện thoại: http://chiase123.com
    Click vào Hiện ra để xem chữ ký của mình

Thông tin về chủ đề này

Users Browsing this Thread

Có 1 người đang xem chủ đề. (0 thành viên và 1 khách)

Các Chủ đề tương tự

  1. How to create a MySQL User - Hướng dẫn tạo user MySQL
    Bởi nghiatichxanh1992 trong diễn đàn VPS - Server
    Trả lời: 0
    Bài viết cuối: 07/05/2015, 22:07
  2. [Linux] Hướng dẫn setup VNC để remote desktop cho VPS Ubuntu
    Bởi nghiatichxanh1992 trong diễn đàn VPS - Server
    Trả lời: 0
    Bài viết cuối: 05/04/2014, 20:06
  3. [Ubuntu] Remote Desktop Cho Vps Linux !
    Bởi nghiatichxanh1992 trong diễn đàn VPS - Server
    Trả lời: 0
    Bài viết cuối: 19/01/2014, 21:32
  4. [MySQL] Lệnh tìm kiếm và thay thế nội dung trong MySQL
    Bởi nghiatichxanh1992 trong diễn đàn PHP & MySQL
    Trả lời: 0
    Bài viết cuối: 20/10/2013, 23:31
  5. Trả lời: 1
    Bài viết cuối: 02/07/2013, 23:16

Tag của Chủ đề này

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •