January 19, 2021

MySQL – Remote Access to MySQL Server on Linux CentOS 6.3 Part 1

In this tutorial I talk you through installing and configuring a MySQL server to allow remote access on Linux using CentOS 6.3.

So first, download and install the mysql server: yum install mysql mysql-server

Next make it so as the mysql server with be running on server startup, issue the following command:

chkconfig mysqld on

Next start the mysqld service

service mysqld start

Next run the command /usr/bin/mysql_secure_installation in order to set the root password and to delete other users and ultimately to stop the root user from having remote access.

Then you can access the mysql server, to make a new user, which you can login in as rather than using the root user all of the time.

We then editted the /etc/my.cnf, to allow the server to be access remotely only on the address of, which was the static ip address of this machine which we install the mysql server on.

We add the following line to this file below the area which is [mysqld]

Note: this ip address needs to be static ip address of this single machine.

Next we added a rule to the firewall by editting the /etc/sysconfig/iptables file, by adding the following line to it, above the ssh line:

-A INPUT -p tcp -m state –state NEW,ESTABLISHED -m tcp –dport 3306 -j ACCEPT

Once you have save and closed this file, restart or reload the iptables:

service iptables restart

Potentially, this is the server ready to be used remotely, although you are still required to add a user which has the correct privileges:

No more space available…best just watch the video!!!!


Nguồn: https://sam-pointer.com/

Xem thêm bài viết khác: https://sam-pointer.com/cong-nghe/

Related Posts

แกะกล่อง รีวิว LED TV star world 17 นิ้ว ดี คุ้มไหม?

July 10, 2020

July 10, 2020 7

แกะกล่องรีวิวสินค้า ทีวี LED star world 17 นิ้ว แบบ analog แต่ก็มีช่องรองรับ interface ได้หลายแบบ ทั้งช่องสัญญาณทีวี av vga หูฟัง usb hdmi ราคาก็อไม่แพงนัก ใครจะใช้แยกห้อง...

🔥Stardew Valley 1.4 Mobile Việt Hóa🔥| Full Crack Download Android

July 14, 2020

July 14, 2020 32

🔥Stardew Valley 1.4 Mobile Việt Hóa🔥| Full Crack Download Android ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Link: Stardew Valley 1.4: ES File Manager Updated :...

Fix the Droid4x – Unable to boot Droid4X, please re-try. Start machine failed! error code=21

July 14, 2020

July 14, 2020 9

Bildiyiniz üzrə Droid4x proqramı, Windows və Mac əməliyyat sistemlərində, android əməliyyat sistemini dəstəkləyən oyun və proqramları yükləmək üçün hazırlanmış pulsuz...

Samsung SSD 960 Evo 500GB Review: Still Super-Fast but Is It Worth It?

July 7, 2020

July 7, 2020 44

Check Samsung SSD 960 Evo prices now: 250GB – 500GB – 1TB – Samsung SSD 960 Evo 500GB Review: Still...


July 7, 2020

July 7, 2020 6

Chào mừng đến với kênh của Thành GàMer ►Subcribe tại đây : ►Like FanPage FACEBOOK: ►Kiểm tra cấu hình máy...

StringStream in C++ (HackerRank Solution)

July 15, 2020

July 15, 2020 10

Solution for StringStream in C++, one of the most popular HackerRank problem solving questions. Learn how to use StringStream in...

FPT Shop – Samsung Galaxy S9 Có Gì HOT?

July 9, 2020

July 9, 2020 16

Samsung Galaxy S9 Có Gì HOT? ➤ ➤ Nguồn: Enoylity Concept Creator **************************************************** ➤ Facebook : ➤ Đăng ký kênh...

Goku SSJ,SSJ2,SSJ3,SSJ4,SSJ5 And SSJ6,SSJ7! Budokai Tenkaichi 3 Mod!~TheGokussj377【HD】

July 10, 2020

July 10, 2020 49

Remake del Mod : ►Creditos a Los Modders. ●Tachibana Kanade: Goku SSJ5 ●Kinnikuchu(Chuchoman): Mapa Fukatsu no F,Bills,Broly SSJ4,Golden Freezer. ●...

How to use SSD1306 128×32 OLED Display I2C with Arduino code

July 15, 2020

July 15, 2020 21

My Arduino Course on Udemy: Learn Arduino from a proven instructor who write his own codes and libraries. This video...

Trên tay và đánh giá hiệu năng ổ cứng SSD NVME Western 250GB | Phúc Anh

July 13, 2020

July 13, 2020 3

Trên tay và đánh giá hiệu năng ổ cứng SSD NVME Western 250Gb | Phúc Anh SSD luôn là linh...

How to get Stardew Valley for FREE on PC! 2019 (No Torrent)

July 16, 2020

July 16, 2020 40

This is a tutorial on how to get Stardew valley for free on pc updated to 2019. There is no...

Download Starcraft 2 Wings of Liberty PC game Mediafire link

July 11, 2020

July 11, 2020 1

———————- ========================= don’t forget to sub and share “thank you very much” to download more games visit my blogspot ============================================...

Sandisk SSD Plus vs Crucial BX500 vs Kingston A400 vs Apacer AS340

July 7, 2020

July 7, 2020 7

Full overview and specs comparison/differences between: Sandisk SSD Plus vs Crucial BX500 vs Kingston A400 vs Apacer AS340 #sandiskplus#bx500crucial #a400kingston...

StartIsBack 2.8 full version plus license key (Activated)

July 11, 2020

July 11, 2020 31

This tutorial will show You How to install and Activated StartIsBack(start is back) 2.8 full version Also show you how...

SSD và HDD khác nhau như thế nào? Hướng dẫn chọn ổ cứng SSD hoặc HDD hợp nhu cầu!!

July 15, 2020

July 15, 2020

Video của Technew hôm nay sẽ giúp các bạn dễ dàng phân biệt được các loại ổ cứng SSD và...

  • Great video. I have been cracking my head trying to figure out this. Thank you very much. Definitely subscribing to your channel.

  • This video helped me a lot for configure my server that i rented from www.datasoft.ws
    Please upload more videos.

  • I wish you people will STOP USING Freakin LOCALHOST and start giving people examples with a laptop from a NON HOSTING LOCATION into a web page's sql database. i.e. whatsmyip.com and using that to connect remotely….nothing seems to work

  • how does this work with phpmyadmin? I have my local machine .100, a webserver .101, and a mysql db .102.
    phpmyadmin is installed on the webserver .101. from my local machine .100 I want to access mysql db through phpmyadmin, so on the local machine I type .101/phpmyadmin in a browser and get the phpmyadmin login page, but can't login. I get an error. should the username be the remote webserver username that was created in mysql (user@.101)?

  • i don't understand. i thought you would just run the MySQL Server Instance Config Wizard and allow the PORT then allow root access. then from the client machines you just need the ip address of the server and you must know the password to connect.

  • Hey @Thornweb Thanks for the video, bu i am using Centos 7 and i need to install Mysql 5.5.28 on it, how can i do that? it's important that the sql version is the exact same. thanks

  • 4 days typing all the posible fucking commands on my dedicated server with Debian 7 and ISPConfig 3. Finally I found this video and now MySQL database can be accessed remotely. Thanks man, this really help me. 😀

  • Hi thanks for this great video,
    I have been given an assignment on accessing mysql db that is installed on a vm which has ubuntu, from pycharm which is installed on other vm that also has ubuntu. what are the details that i have to give in to connect the database to the pycharm. Thanks in advance.

  • hello, 
    I've been assigned to create a lamp cluster and install wordpress in my class. but my instructor has told us to install MYSQL in server A and install PHP,APACHE,WORDPRESS on server B. 
    i've installed all packages on both servers. but the problem is  when i go to the web browser and insert my ip address it says my php is missing a MYSQL extension
    (server B). 
    i did everything you instructed but when i got to the part where you need to put the command on Server B
    #mysql  -u james -h -p 
    it says 
    bash: mysql: command not found 
    i personally don't think its possible for this assignment to work without server B also having mysql. 
    what do you think i should, is this possible and if so how because I've been trying for almost 2 weeks now. you would really be helping me out on this.
    thank you so much in advance. 

  • I'd like to setup remote SQL access for anywhere… I attempted

    mysql> create user 'username'@'%' identified by 'password';
    ERROR 1396 (HY000): Operation CREATE USER failed for 'username'@'%'

    as well as  

    mysql> create user 'username'@'*' identified by 'password';
    Query OK, 0 rows affected (0.00 sec)

    ^^ This one seemed to actually do something, but I still get a connection error

    Any ideas?

  • step bind-address=
    service mysqld restart 
    Starting mysqld:                                           [FAILED]
    help me

  • Thanks Dude it helped me to configure mysql remotely. I was searching for this from past one week. Thanks a lot.

Leave a Reply

Your email address will not be published. Required fields are marked *