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 10.10.10.30, 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]
bind-address=10.10.10.30
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!!!!
#davidsvideos
Nguồn: https://sam-pointer.com/
Xem thêm bài viết khác: https://sam-pointer.com/cong-nghe/
Xem thêm Bài Viết:
- Ưu Và Nhược Điểm Của Các Phần Mềm Quản Lý Dự Án
- Chipset B550 – Kẻ thay thế X570 với mức giá MỀM hơn rất nhiều
- Which SSD Is Better – Samsung 860 PRO vs 850 PRO SSD
- Installing Samsung Evo 860 250Gb SSD in G41 Board | Unbox, Review & how to install OS in ssd + HDD
- Samsung 860 EVO Review and Installation
5:50 i put in the password and it says access denied
thank you for your videos
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.
Edit your title it's misleading – get to the point according to your title
where is iptables file on ubunutu 16
Thank you David!
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
OMG THANK YOU!
very helpful tutorial … thanks. 🙂
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.
Why not just SSH into the server and access MYSQL that way?
This tutorial was excellent. really helpful thank you keep doing
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
This is everything I'm looking for. Thanks heaps for making this tutorial!
Buen vídeo, muy bien explicado. Gracias!
This video is awesome, helped me learn and solve some issues I was having!
This tutorial was excellent. Exactly the info I needed to get remote connect to MySQL. Cheers!
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 10.0.0.23 -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?
How can you open the root@………. Window?
step bind-address=0.0.0.0
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.