Free Web Hosting Forum
(#1 (permalink))
Old
Junior Member
wouter is on a distinguished road
 
Posts: 4
Join Date: Jul 2008
Default MySQL problem - 07-19-2008, 07:26 PM

I got a problem im using Microsoft visual basic C# 2008 expres edition to run some programs

i made a program that i need to get connected to my sql database
im using this
Code:
host=mysql2.000webhost.com
port=3306
database=a9267032_holodb
username=a9267032_root
password=hidden
but somehow it cant connect my database
when i check if mysql2.000webhost.com online is its offline

please help
Reply With Quote
(#2 (permalink))
Old
Bad Karma[CORE]'s Avatar
Senior Member
Bad Karma[CORE] is on a distinguished road
 
Posts: 585
Join Date: May 2008
Send a message via ICQ to Bad Karma[CORE] Send a message via AIM to Bad Karma[CORE] Send a message via MSN to Bad Karma[CORE] Send a message via Yahoo to Bad Karma[CORE] Send a message via Skype™ to Bad Karma[CORE]
Default 07-19-2008, 07:29 PM

can you post the entire code that you use to connect to your db ?


(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
Free Domains
5 Bucks Script Installation Services
Free Web Hosting
Layer-Ads - Das Werbenetzwerk von morgen
Reply With Quote
(#3 (permalink))
Old
Junior Member
wouter is on a distinguished road
 
Posts: 4
Join Date: Jul 2008
Default 07-19-2008, 07:42 PM

Code:
private static void Boot()
        {
            ThreadPool.SetMaxThreads(300,400);
            DateTime _START = DateTime.Now;
            Out.WriteLine("Starting up for " + Environment.UserName + "...");
            Out.WriteLine("Expanded threadpool.");
            Out.WriteLine(@"Checking for \bin\mysql.ini...");

            string sqlConfigLocation = IO.workingDirectory + @"\bin\mysql.ini";
            if (System.IO.File.Exists(sqlConfigLocation) == false)
            {
                Out.WriteError("mysql.ini not found at " + sqlConfigLocation);
                Shutdown();
                return;
            }

            Out.WriteLine("mysql.ini found at " + sqlConfigLocation);
            Out.WriteBlank();

            string dbHost = IO.readINI("mysql", "host", sqlConfigLocation);
            int dbPort = int.Parse(IO.readINI("mysql", "port", sqlConfigLocation));
            string dbUsername = IO.readINI("mysql", "username", sqlConfigLocation);
            string dbPassword = IO.readINI("mysql", "password", sqlConfigLocation);
            string dbName = IO.readINI("mysql", "database", sqlConfigLocation);

            if (DB.openConnection(dbHost, dbPort, dbName, dbUsername, dbPassword) == false)
                return;

            Out.WriteBlank();


            int gamePort;
            int gameMaxConnections;
            int musPort;
            int musMaxConnections;
            string musHost;

            

            try
            {
                gamePort = int.Parse(Config.getTableEntry("server_game_port"));
                gameMaxConnections = int.Parse(Config.getTableEntry("server_game_maxconnections"));
                musPort = int.Parse(Config.getTableEntry("server_mus_port"));
                musMaxConnections = int.Parse(Config.getTableEntry("server_mus_maxconnections"));
                musHost = Config.getTableEntry("server_mus_host");
            }

            catch
            {
                Out.WriteError("system_config table contains invalid values for socket server configuration!");
                Shutdown();
                return;
            }

            string langExt = Config.getTableEntry("lang");
            if (langExt == "")
            {
                Out.WriteError("No valid language extension [field: lang] was set in the system_config table!");
                Shutdown();
                return;
            }

            stringManager.Init(langExt);
            Out.WriteBlank();

            stringManager.initFilter();
            Out.WriteBlank();

            catalogueManager.Init();
            Out.WriteBlank();

            recyclerManager.Init();
            Out.WriteBlank();

            rankManager.Init();
            Out.WriteBlank();

            Config.Init();
            Out.WriteBlank();

            userManager.Init();
            eventManager.Init();

            if (gameSocketServer.Init(gamePort, gameMaxConnections) == false)
            {
                Shutdown();
                return;
            }
            Out.WriteBlank();

            if (musSocketServer.Init(musPort, musHost) == false)
            {
                Shutdown();
                return;
            }
            Out.WriteBlank();

            resetDynamics();
            Out.WriteBlank();

            printDatabaseStats();
            Out.WriteBlank();

            DateTime _STOP = DateTime.Now;
            TimeSpan _TST = _STOP - _START;
            Out.WriteLine("Startup time in fixed milliseconds: " + _TST.TotalMilliseconds.ToString() + ".");
            
            GC.Collect();
            Out.WriteLine("Holograph Emulator ready. Status: idle");
            Out.WriteBlank();

            Out.minimumImportance = Out.logFlags.MehAction; 
            serverMonitor.Priority = ThreadPriority.Lowest;
            serverMonitor.Start();
        }
        /// <summary>
        /// </summary>
it loads the mysql.ini that i posted before
Reply With Quote
(#4 (permalink))
Old
Mr.Whisper's Avatar
Member
Mr.Whisper is on a distinguished road
 
Posts: 67
Join Date: May 2008
Send a message via MSN to Mr.Whisper
Default 07-20-2008, 08:06 AM

i think 000webhost was disable mysql remote connection.(and many place were disable too. i think because some security reason)

so. you can do remote connection through web interface. you may code a page for get your operation and send result back to your client.


OSS-Zone

We present Freeware & Opensource to Everyone!
Reply With Quote
(#5 (permalink))
Old
Junior Member
wouter is on a distinguished road
 
Posts: 4
Join Date: Jul 2008
Default 07-20-2008, 10:54 AM

Thank you for your reply

I was thinking that it may block some connections

what kind of page do i need to code for it to work?
Reply With Quote
(#6 (permalink))
Old
Mr.Whisper's Avatar
Member
Mr.Whisper is on a distinguished road
 
Posts: 67
Join Date: May 2008
Send a message via MSN to Mr.Whisper
Default 07-20-2008, 01:11 PM

Quote:
Originally Posted by wouter View Post
Thank you for your reply

I was thinking that it may block some connections

what kind of page do i need to code for it to work?
every language that can working with MySQL and your host was support.

eg. php, perl, cgi, asp, asp.net, jsp and other(so 000webhost support php, but other lang i don't know )


OSS-Zone

We present Freeware & Opensource to Everyone!
Reply With Quote
(#7 (permalink))
Old
Junior Member
wouter is on a distinguished road
 
Posts: 4
Join Date: Jul 2008
Default 07-20-2008, 01:24 PM

Thank you i founded out that i need to upgrade my account to get it to work
becouse it only allows remote connection with an upgrade account
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0
vBulletin Skin developed by: vBStyles.com