connect to mysql server from remote on redhat
Moderator: General Moderators
connect to mysql server from remote on redhat
helllo
I just made a quick reference and found a lot of things on how to connect remote to server.
How to configure the mysql server and client? And what is SSH? Do i need to adjust IP tables. Can someone guide me?
Thanks
I just made a quick reference and found a lot of things on how to connect remote to server.
How to configure the mysql server and client? And what is SSH? Do i need to adjust IP tables. Can someone guide me?
Thanks
Re: connect to mysql server from remote on redhat
You'll have to GRANT users on the remote machine (client) some prvileges. Example:cade wrote:How to configure the mysql server and client?
Code: Select all
mysql> grant all on database_name.* to user_name@host_name_or_ip identified by 'your_password_for_remote_client_here';It is secured connection to your server - e.g. you can run shell commands in the server. If you are using Windows on the client PC search for "PuTTY".cade wrote:And what is SSH?
It is "iptables"cade wrote:Do i need to adjust IP tables.
It is the "firewall" for Linux based servers. You will have to open port 3306 for the client's host. E.g.:
Code: Select all
iptables -I INPUT -p tcp --dport 3306 -s CLIENT_IP_HERE -j ACCEPT
iptables -I OUTPUT -p tcp --sport 3306 -d CLIENT_IP_HERE -j ACCEPTThere are 10 types of people in this world, those who understand binary and those who don't
I wouldn't allow external connections to the database, because (afaik) mysql sends unencrypted data... I'd rather setup an ssl tunnel and send the data over that connection.
eg:
Now my program can connect to localhost:3307and ssh will make sure that it ends up at example.:3308 without others being able to see the actual data
For windows users i suggest that you take a look at Plink.
eg:
Code: Select all
ssh -N -L 3307:example:3308 timvw@exampleI have try to update user and set new password for new user and new host.
I also have adjusted my.cnf file and bind the IP address to mysql server.
Can anyone tell me what is going on?
I don't like linux.
It's not friendly to me.
The iptables also not present in my client's linux system. How can I bypass this setting
I have search all over the internet to revoke those setting but now it didn't work. It really depressed when things become more worse than I thought. Please advise how to revert those setting. Please....
I also have adjusted my.cnf file and bind the IP address to mysql server.
Can anyone tell me what is going on?
I don't like linux.
It's not friendly to me.
The iptables also not present in my client's linux system. How can I bypass this setting
I have search all over the internet to revoke those setting but now it didn't work. It really depressed when things become more worse than I thought. Please advise how to revert those setting. Please....
OK. Let's do some checks:
First run
You chould get an ouput like this:
Please, post it here.
If you it isn't the case run:
You should get an output containing several lines with numbers - if it isn't the case then mysql is not runing.
If iptables is not installed on your system, then probably you don't have a firewall at all, so it isn't a firewall problem.
First run
Code: Select all
netstat -ntap | grep mysqlCode: Select all
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTENIf you it isn't the case run:
Code: Select all
pgrep mysqldIf iptables is not installed on your system, then probably you don't have a firewall at all, so it isn't a firewall problem.
There are 10 types of people in this world, those who understand binary and those who don't
OK. Let's do some checks:
First run
You chould get an ouput like this:
Please, post it here.
If you it isn't the case run:
You should get an output containing several lines with numbers - if it isn't the case then mysql is not runing.
If iptables is not installed on your system, then probably you don't have a firewall at all, so it isn't a firewall problem.
PS: "Linux is unfriendly" - you mean it is not a "NxNext clicks" administration
First run
Code: Select all
netstat -ntap | grep mysqlCode: Select all
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTENIf you it isn't the case run:
Code: Select all
pgrep mysqldIf iptables is not installed on your system, then probably you don't have a firewall at all, so it isn't a firewall problem.
PS: "Linux is unfriendly" - you mean it is not a "NxNext clicks" administration
There are 10 types of people in this world, those who understand binary and those who don't