Vds database issue

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
justin2234
A regular
A regular
Posts: 40
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sat Oct 31, 2015 10:29 am

Vds database issue

Post by justin2234 »

My vds wont let me install my forums with a hostname of the actual website. it works on my other vds but i just made this new vds and it wont let me.
Its only letting me install with "localhost" which i dont want, i want to use the actual ip for the hostname. is there something in apache2 blocking this that i can unblock?

Using: Linux unmanaged 1 core vds
Image
User avatar
Vanderburg
Former staff
Former staff
Posts: 1253
Joined: Sat Nov 13, 2010 7:27 am
Location: Dallas, TX

Re: Vds database issue

Post by Vanderburg »

Do you have an actual domain or subdomain pointing to the VDS, or are you referring just to the hostname that is set when it's installed? The hostname set during the OS installation is just your identifier and doesn't actually resolve to anything.
justin2234
A regular
A regular
Posts: 40
Joined: Sat Oct 31, 2015 10:29 am

Re: Vds database issue

Post by justin2234 »

Vanderburg wrote:Do you have an actual domain or subdomain pointing to the VDS, or are you referring just to the hostname that is set when it's installed? The hostname set during the OS installation is just your identifier and doesn't actually resolve to anything.
i bought a domain, connected it with type "A" targeting the vds IP.
but im just installing a forums and a sourcebans and i need the "hostname" which i always use the vds ip and so that always works but for this newly made vds its not allowing me to do it and says it cannot connect to mysql. Yet its making me do it to "localhost" for the hostname which works except the actual ip... which i cant do and is what i need to connect the sourcebans and many other things in my vds phpmyadmin databases.
Im wondering if apache2 has a config that blocks this?
Image
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Vds database issue

Post by soja »

Ok so you're having issues setting your mysql server, that is different from the initial tone of your post.

Is the MySQL server you are trying to use local or remote(on another vds, or on NFOs shared webhosting)?

Also, this should have nothing to do with apache.
Not a NFO employee
justin2234
A regular
A regular
Posts: 40
Joined: Sat Oct 31, 2015 10:29 am

Re: Vds database issue

Post by justin2234 »

soja wrote:Ok so you're having issues setting your mysql server, that is different from the initial tone of your post.

Is the MySQL server you are trying to use local or remote(on another vds, or on NFOs shared webhosting)?

Also, this should have nothing to do with apache.
The vds i have is on nfo. Its not letting me use the vds ip as the hostname for anything it says "mysql cannot connect" yet the user/pass/database name is all correct. Its the hostname which its not letting me use which is frustrating, im not sure how to fix this.
Image
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Vds database issue

Post by soja »

Is your database server local(on the same machine as your web server) or remote(on a different VDS)?
Not a NFO employee
justin2234
A regular
A regular
Posts: 40
Joined: Sat Oct 31, 2015 10:29 am

Re: Vds database issue

Post by justin2234 »

soja wrote:Is your database server local(on the same machine as your web server) or remote(on a different VDS)?
On the same machine, that same vds i installed apache2,mysql,phpmyadmin,php. and i threw the sourcebans and forums files on that vds ftp and i have the databases on there as well.
Image
justin2234
A regular
A regular
Posts: 40
Joined: Sat Oct 31, 2015 10:29 am

Re: Vds database issue

Post by justin2234 »

Someone said bind a ip address to mysql so it allows access?
Image
justin2234
A regular
A regular
Posts: 40
Joined: Sat Oct 31, 2015 10:29 am

Re: Vds database issue

Post by justin2234 »

Found the issue...
all i needed to do is go to
/etc/mysql/mysql.conf.d/mysqld.cnf

and remove bind-address = 127.0.0.1 by just adding a #
Image
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Vds database issue

Post by soja »

justin2234 wrote:Found the issue...
all i needed to do is go to
/etc/mysql/mysql.conf.d/mysqld.cnf

and remove bind-address = 127.0.0.1 by just adding a #
localhost or 127.0.0.1 was the proper address to use in your configuration. If you don't need to access the mysql server remotely(from game servers and such) you should put the mysql server back to bind on 127.0.0.1. With the configuration change you made you allowed the mysql server to be accessible from the outside world, which is an unnecessary security risk if you don't need external access.
Not a NFO employee
justin2234
A regular
A regular
Posts: 40
Joined: Sat Oct 31, 2015 10:29 am

Re: Vds database issue

Post by justin2234 »

soja wrote:
justin2234 wrote:Found the issue...
all i needed to do is go to
/etc/mysql/mysql.conf.d/mysqld.cnf

and remove bind-address = 127.0.0.1 by just adding a #
localhost or 127.0.0.1 was the proper address to use in your configuration. If you don't need to access the mysql server remotely(from game servers and such) you should put the mysql server back to bind on 127.0.0.1. With the configuration change you made you allowed the mysql server to be accessible from the outside world, which is an unnecessary security risk if you don't need external access.
oh well then....
Image
Post Reply