Forsaken sanctum mysql and 000webhost help
-
Baseball435
- Posts: 548
- Joined: Sun May 30, 2010 3:49 am
Forsaken sanctum mysql and 000webhost help
Hey everyone, I wanted to upload forsaken sanctum onto the Internet just to test it to see if I can actually get it running on the Internet. So I used 000webhost.con and I change the connect.php file to my 000webhost mysql database and I changed the root to the username and my password and I uploaded all of the files including setting up everything in mysql phpmyadmin which they supply for you. So i went to the website and I keep getting an error and idk why, the website is fsanctum.site90.net . Help please?
Here's the error!
PHP Error Message
Warning: mysql_connect() [function.mysql-connect]: Host 'srv19.000webhost.com' is not allowed to connect to this MySQL server in /home/a6977875/public_html/connect.php on line 3
Could not connect.
Here's the error!
PHP Error Message
Warning: mysql_connect() [function.mysql-connect]: Host 'srv19.000webhost.com' is not allowed to connect to this MySQL server in /home/a6977875/public_html/connect.php on line 3
Could not connect.
Re: Forsaken sanctum mysql and 000webhost help
I'm guessing you are using the wrong host.
The function should be
You might also need to add the port at the end of the host, eg:
The function should be
Code: Select all
$db = mysql_connect("host", "username", "password") or die("Could not connect.");
Code: Select all
$db = mysql_connect("host:3306", "username", "password") or die("Could not connect.");
Fighting for peace is declaring war on war. If you want peace be peaceful.
- SpiritWebb
- Posts: 3107
- Joined: Sun Jul 12, 2009 11:25 pm
Re: Forsaken sanctum mysql and 000webhost help
You need to create a database through 000webhost, this will allow you to create a username and password, and will give you the host name.
Then with that information you need to change the
to
Then with that information you need to change the
Code: Select all
$db = mysql_connect("host:3306", "username", "password") or die("Could not connect.");
Code: Select all
$db = mysql_connect("host name given", "your username you chose", "your password you chose") or die("Could not connect.";
-
Baseball435
- Posts: 548
- Joined: Sun May 30, 2010 3:49 am
Re: Forsaken sanctum mysql and 000webhost help
Yeah I did all of that, except my host is like random numbers and letters then _forsaken. Is that correct or is it supposed to be like host:####
- SpiritWebb
- Posts: 3107
- Joined: Sun Jul 12, 2009 11:25 pm
Re: Forsaken sanctum mysql and 000webhost help
The random numbers and then _forsaken. It is put there in place so it will read your database. those random numbers are your username basically.
-
Baseball435
- Posts: 548
- Joined: Sun May 30, 2010 3:49 am
Re: Forsaken sanctum mysql and 000webhost help
ok That what's I thoughtSpiritWebb wrote:The random numbers and then _forsaken. It is put there in place so it will read your database. those random numbers are your username basically.
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Forsaken sanctum mysql and 000webhost help
you sure you got the username and pass correct?
-
Baseball435
- Posts: 548
- Joined: Sun May 30, 2010 3:49 am
Re: Forsaken sanctum mysql and 000webhost help
Ok this is all of my information, without the info next to it obviously. Only the mysql stuff. The user and pass is the mysql user and pass though. Idk what the host is still. If anyone has a different webhost that's free tell me it. But here's the INfo
Domain
Username
Password
Disk Usage
Bandwidth
Home Root
Server Name
IP Address
Apache ver. 2.2.13 (Unix)
PHP version 5.2.*
MySQL ver. 5.0.81-community
Activated On
Status Active
Domain
Username
Password
Disk Usage
Bandwidth
Home Root
Server Name
IP Address
Apache ver. 2.2.13 (Unix)
PHP version 5.2.*
MySQL ver. 5.0.81-community
Activated On
Status Active
- SpiritWebb
- Posts: 3107
- Joined: Sun Jul 12, 2009 11:25 pm
Re: Forsaken sanctum mysql and 000webhost help
Click on MySQL in your cPanel, you should see the following:
Manage MySQL Databases
MySQL databases are required by many web applications including bulletin boards, content management systems, and others. To use MySQL, you need to create database and user, which will be automatically assigned to this database. Click for phpMyAdmin when database is created.
Important: MySQL Host for any database in this account is *******, do not use localhost!
The **** section is your host. Use this in place of localhost.
EDIT: I stared my host out, but you will see yours.
Manage MySQL Databases
MySQL databases are required by many web applications including bulletin boards, content management systems, and others. To use MySQL, you need to create database and user, which will be automatically assigned to this database. Click for phpMyAdmin when database is created.
Important: MySQL Host for any database in this account is *******, do not use localhost!
The **** section is your host. Use this in place of localhost.
EDIT: I stared my host out, but you will see yours.
-
Baseball435
- Posts: 548
- Joined: Sun May 30, 2010 3:49 am
Re: Forsaken sanctum mysql and 000webhost help
Yesss thank you so much spiritwebb. Now it's working

