Jump to content
The Uniform Server Community

Website having problems connecting to local mysql database.


Znote
 Share

Recommended Posts

Greetings.

 

I have a small problem, here is the situation:

 

I have a game server installed, and uniform server installed.

 

I look at Uniform Server as a way better candidate than XAMPP, since its light-weighted, and has all the necessary functions.

 

I start mySQL and Apache on uniform server, it all seem to be working perfectly, I add the security steps (all without the PHP, that isn't necessary).

 

I enter phpmyadmin, replace root user with my custom user. (To avoid root brute-forcing programs).

 

I create another limited user which got full access to 1 database, and I import the gameservers database structures using import file.

 

Everything works fine so far.

 

I start the game server, it connects to the mySQL database, it works fine.

 

However, with this game server, it comes a website pack, so you can enter website to create account, view highscores and such things for the game server.

 

What I do is to remove everything is remove everything in D:\UniServer\www

and replace it with the website files. Then I configure the parts, and I write correct mySQL details. (Using the same as the game server).

 

It works perfectly on the game server, but when I am running website using Apache, I get "Cannot connect to database."

 

I have checked, and rechecked several times, the connection details is correct.

 

When I enter phpmyadmin, and I write exactly what's in the website configs, it works just fine.

 

When I use XAMPP instead of uniform server, it also works perfectly.

 

But I don't want to use XAMPP, anyone got any idea why it does not work properly?

 

I am testing this on my Windows 7 local computer, it is not port forwarded, I use it for testing purposes. So when connecting to database, I used "localhost". Which works perfectly using the game server, but not through Apache.

 

I am using Uniform Server 5.6.4

 

Any help or questions is highly appreciated! :)

I am representing the open tibia community otland.net
otland.net is contributing open source server software to an 2d mmorpg game called Tibia.

Here are some Uniform server tutorials/guide contributions from me:
VIDEO TUTORIAL: I teach newbreeds to install and operate uniform server: (Updated for Coral 8.x)
http://youtu.be/AsyxPhDTOcI

Uniform Server newbie guide:
Securely installing Uniform Server for total newbeginners:
http://otland.net/f479/nothing-fully-worki...-0-3-6-a-77593/
(also contains how to get our open source tibia game, and connect it successfully to the uniform mysql server).

How to add a website for our open source tibia game which includes highscore, create account and so on: (On uniform server)
http://otland.net/f479/website-installing-...m-server-91951/

Link to comment
Share on other sites

I have also tried to use 127.0.0.1 to connect to the local database, it still does not work.

 

Any help please. :) I might have to go back to XAMPP, I don't want that! :)

 

Also tried to downgrade PHP version to 5.3.0, but it still does not seem to work.

 

Also tried with clean 5.1 nano and it still does not work, so it seems like the version is not whats wrong. I guess I am doing some sort of noob mistake.

 

Also tested with Windows XP professional. Just for the sake of testing with a recommended OS. Still having same problem.

 

Edit: aright, I managed to fix the problem! Wohoo! :)

 

I noticed, the SQL worked perfectly from the game server, but did not work properly on website, so it had to be something with PHP.

 

So I checked PHP.ini and I found the problem, PDO_mysql was not enabled. I removed the comment sign and it worked. :)

 

Very dead forum. :S Not very useful. :) Got no help, had to figure it out myself. :|

I am representing the open tibia community otland.net
otland.net is contributing open source server software to an 2d mmorpg game called Tibia.

Here are some Uniform server tutorials/guide contributions from me:
VIDEO TUTORIAL: I teach newbreeds to install and operate uniform server: (Updated for Coral 8.x)
http://youtu.be/AsyxPhDTOcI

Uniform Server newbie guide:
Securely installing Uniform Server for total newbeginners:
http://otland.net/f479/nothing-fully-worki...-0-3-6-a-77593/
(also contains how to get our open source tibia game, and connect it successfully to the uniform mysql server).

How to add a website for our open source tibia game which includes highscore, create account and so on: (On uniform server)
http://otland.net/f479/website-installing-...m-server-91951/

Link to comment
Share on other sites

Tested with PDO enabled in php.ini file now on 3 OS.

 

1: Windows XP 32bit. [Works]

2: Windyws 7 64bit. [Does not work]

3: Windows Server 2003 Web Edition 32bit. [Works]

 

Works perfectly with XP 32bit, but does not work on W7 64bit.

 

Any ideas how to make it work on Windows 7 64bit?

 

Going to test on my Windows Server 2003 Web Edition today. edit: Done. It works.

I am representing the open tibia community otland.net
otland.net is contributing open source server software to an 2d mmorpg game called Tibia.

Here are some Uniform server tutorials/guide contributions from me:
VIDEO TUTORIAL: I teach newbreeds to install and operate uniform server: (Updated for Coral 8.x)
http://youtu.be/AsyxPhDTOcI

Uniform Server newbie guide:
Securely installing Uniform Server for total newbeginners:
http://otland.net/f479/nothing-fully-worki...-0-3-6-a-77593/
(also contains how to get our open source tibia game, and connect it successfully to the uniform mysql server).

How to add a website for our open source tibia game which includes highscore, create account and so on: (On uniform server)
http://otland.net/f479/website-installing-...m-server-91951/

Link to comment
Share on other sites

Tested with Windows 7 64bit on two computers, does not work.

I am representing the open tibia community otland.net
otland.net is contributing open source server software to an 2d mmorpg game called Tibia.

Here are some Uniform server tutorials/guide contributions from me:
VIDEO TUTORIAL: I teach newbreeds to install and operate uniform server: (Updated for Coral 8.x)
http://youtu.be/AsyxPhDTOcI

Uniform Server newbie guide:
Securely installing Uniform Server for total newbeginners:
http://otland.net/f479/nothing-fully-worki...-0-3-6-a-77593/
(also contains how to get our open source tibia game, and connect it successfully to the uniform mysql server).

How to add a website for our open source tibia game which includes highscore, create account and so on: (On uniform server)
http://otland.net/f479/website-installing-...m-server-91951/

Link to comment
Share on other sites

  • 4 weeks later...

A month is gone and yet not a single reply. :angry:

 

Now also tested with Windows Server 2008 64bit.

 

Bad luck. Does uniform server has terrible support with 64bit?

I am representing the open tibia community otland.net
otland.net is contributing open source server software to an 2d mmorpg game called Tibia.

Here are some Uniform server tutorials/guide contributions from me:
VIDEO TUTORIAL: I teach newbreeds to install and operate uniform server: (Updated for Coral 8.x)
http://youtu.be/AsyxPhDTOcI

Uniform Server newbie guide:
Securely installing Uniform Server for total newbeginners:
http://otland.net/f479/nothing-fully-worki...-0-3-6-a-77593/
(also contains how to get our open source tibia game, and connect it successfully to the uniform mysql server).

How to add a website for our open source tibia game which includes highscore, create account and so on: (On uniform server)
http://otland.net/f479/website-installing-...m-server-91951/

Link to comment
Share on other sites

MyQL server is independent of US try upgrading to a 64 bit version as follows:.

 

US Initial set-up:

1 Create a new folder c:\us_temp

2 Download and save UniServer5_6_6.exe to above foder

3 Extract files (double click on UniServer5_6_6.exe)

4 Run Start.exe

5 From UniTray run “Server status”

6 Close UniTray

7 Open file C:\us_temp\UniServer\usr\local\mysql\my.ini

8 Look for basedir = "C:/us_temp/UniServer/usr/local/mysql/"

Your path must match that shown, confirms US set-up is working.

 

MySQL 64Bit install:

1 Create a new folder c:\us_temp1

2 Download file Windows (x86, 64-bit), ZIP

From http://dev.mysql.com/downloads/mysql/5.1.html#downloads

3 Save to above folder. Extract all to this folder

4 Navigate to folder C:\us_temp1\mysql-noinstall-5.1.47-winx64\mysql-5.1.47-winx64\bin

Copy the following files to folder C:\us_temp\UniServer\usr\local\mysql\bin allow overwrite:

mysql.exe

mysqladmin.exe

mysqldump.exe

Copy file mysqld.exe

Delete file mysqld-opt.exe

Rename mysqld.exe to mysqld-opt.exe (renaming is a legacy thing)

5 Navigate to folder C:\us_temp1\mysql-noinstall-5.1.47-winx64\mysql-5.1.47-winx64\share

Copy across all folders and files that match to folder

C:\us_temp\UniServer\usr\local\mysql\share

allow overwrite:

6 Navigate to folder C:\us_temp1\mysql-noinstall-5.1.47-winx64\mysql-5.1.47-winx64\data\mysql

Copy all files in this folder to

C:\us_temp\UniServer\usr\local\mysql\data\mysql

7 Copy file C:\us_temp1\mysql-noinstall-5.1.47-winx64\mysql-5.1.47-winx64\bin\ libmysql.dll

To folder C:\us_temp\UniServer\usr\local\php

 

MySQL 64Bit set-up:

1 From folder C:\us_temp\UniServer

2 Run Start.exe

3 From UniTray run “Start UniServer”

4 From UniTray run “Server status”

Confirm both servers are running.

5 Set default password

From UniTray select “Advanced” run “MySQL password restore”

 

PhpMyAdmin check

Restart servers and check phpMyAdmin can access MySQL server.

 

The above may offer a solution I am unable to test this since I do not have access to a 64Bit machine.

 

All the best

Ric :angry:

Link to comment
Share on other sites

Alright, I just had the time to test it out.

 

Tested on: Windows 7 Enterprise 64bit:

 

Before clicking "Start Uniform Server"

================== UNIFORM SERVER STATUS ==================

 

Your Internet IP Address = 85.19.89.238

Accessible from Internet = NO

Cron run status = Not running

PHP INI: php.ini file = Production

 

APACHE SERVER:

 

Apache port = 80

Apache SSL port = 443

Apache executable name = Apache.exe

Apache service name = ApacheS1

Apache SSL server = Disabled

Apache run status = Not running

Apache install status = Free to install

 

MySQL SERVER:

 

MySQL port = 3306

MySQL executable name = mysqld-opt.exe

MySQL service name = MySQLS1

MySQL run status = Not running

MySQL install status = Free to install

 

PORT STATUS:

 

Apache port = 80 Is free to use

Apache SSL port = 443 Is free to use

MySQL port = 3306 Is free to use.

 

 

Press any key to continue . . .

 

After clicking "Start Uniform Server"

================== UNIFORM SERVER STATUS ==================

 

Your Internet IP Address = 85.19.89.238

Accessible from Internet = NO

Cron run status = Not running

PHP INI: php.ini file = Production

 

APACHE SERVER:

 

Apache port = 80

Apache SSL port = 443

Apache executable name = Apache.exe

Apache service name = ApacheS1

Apache SSL server = Disabled

Apache run status = Not running

Apache install status = Free to install

 

MySQL SERVER:

 

MySQL port = 3306

MySQL executable name = mysqld-opt.exe

MySQL service name = MySQLS1

MySQL run status = Not running

MySQL install status = Free to install

 

PORT STATUS:

 

Apache port = 80 Is free to use

Apache SSL port = 443 Is free to use

MySQL port = 3306 In use by another program.

 

 

Press any key to continue . . .

 

mysql64bit.png

 

Apparently, Mysql is now running 64bit.

 

And when clicking "Start Uniformserver" the 64bit mysql started up. Even though it said "running by another server".

 

However, Apache? Apache is not starting any longer when clicking "Start Uniformserver"? :S

I am representing the open tibia community otland.net
otland.net is contributing open source server software to an 2d mmorpg game called Tibia.

Here are some Uniform server tutorials/guide contributions from me:
VIDEO TUTORIAL: I teach newbreeds to install and operate uniform server: (Updated for Coral 8.x)
http://youtu.be/AsyxPhDTOcI

Uniform Server newbie guide:
Securely installing Uniform Server for total newbeginners:
http://otland.net/f479/nothing-fully-worki...-0-3-6-a-77593/
(also contains how to get our open source tibia game, and connect it successfully to the uniform mysql server).

How to add a website for our open source tibia game which includes highscore, create account and so on: (On uniform server)
http://otland.net/f479/website-installing-...m-server-91951/

Link to comment
Share on other sites

  • 4 weeks later...

Carbo 6.0.0 beta 1 is working fine and has Windows 7 64bit compatibility!

 

Most likely because of the new VC9 engine! :) Thanks so much! This will definitely help making Uniform Server more popular!

 

I will start to rewrite my uniform server tutorial(THIS) and tell people it finally works great with 64bit. :blink:

I am representing the open tibia community otland.net
otland.net is contributing open source server software to an 2d mmorpg game called Tibia.

Here are some Uniform server tutorials/guide contributions from me:
VIDEO TUTORIAL: I teach newbreeds to install and operate uniform server: (Updated for Coral 8.x)
http://youtu.be/AsyxPhDTOcI

Uniform Server newbie guide:
Securely installing Uniform Server for total newbeginners:
http://otland.net/f479/nothing-fully-worki...-0-3-6-a-77593/
(also contains how to get our open source tibia game, and connect it successfully to the uniform mysql server).

How to add a website for our open source tibia game which includes highscore, create account and so on: (On uniform server)
http://otland.net/f479/website-installing-...m-server-91951/

Link to comment
Share on other sites

Hi Znote

An interesting and informative post it’s the first feedback on 6.0.0-Carbo.

Rewriting a tutorial implies you have given Carbo a real workout and bashing. :)

 

All the best

Ric :blink:

Link to comment
Share on other sites

I am not able to properly test the performance. All I know is that it is working fine which is very great! Wider compatibility makes things much easier.

 

Tested Carbo on Windows Vista 32bit and extention PDO_mysql did not work.

I am representing the open tibia community otland.net
otland.net is contributing open source server software to an 2d mmorpg game called Tibia.

Here are some Uniform server tutorials/guide contributions from me:
VIDEO TUTORIAL: I teach newbreeds to install and operate uniform server: (Updated for Coral 8.x)
http://youtu.be/AsyxPhDTOcI

Uniform Server newbie guide:
Securely installing Uniform Server for total newbeginners:
http://otland.net/f479/nothing-fully-worki...-0-3-6-a-77593/
(also contains how to get our open source tibia game, and connect it successfully to the uniform mysql server).

How to add a website for our open source tibia game which includes highscore, create account and so on: (On uniform server)
http://otland.net/f479/website-installing-...m-server-91951/

Link to comment
Share on other sites

  • 2 months later...

ok, post edited. Got very weird results. Think I did something wrong.

 

Yeah, he told me I was configurating windows 2003 server 64bit but I was configuring 32bit. He ordered a dedicated server and gave me access to test it without checking if he got the correct server himself. >.<

Typical brasillian hosting companies.

I am representing the open tibia community otland.net
otland.net is contributing open source server software to an 2d mmorpg game called Tibia.

Here are some Uniform server tutorials/guide contributions from me:
VIDEO TUTORIAL: I teach newbreeds to install and operate uniform server: (Updated for Coral 8.x)
http://youtu.be/AsyxPhDTOcI

Uniform Server newbie guide:
Securely installing Uniform Server for total newbeginners:
http://otland.net/f479/nothing-fully-worki...-0-3-6-a-77593/
(also contains how to get our open source tibia game, and connect it successfully to the uniform mysql server).

How to add a website for our open source tibia game which includes highscore, create account and so on: (On uniform server)
http://otland.net/f479/website-installing-...m-server-91951/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...