• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Database error

hejhej

New Member
Joined
Jul 27, 2008
Messages
61
Reaction score
0
Im gettin this error when in trying to start my otserver!

Failed connecting to database - MYSQL ERROR: Can't connect to MySQL server on 'localhost' (10061) (2003)

Code:
	-- Database
	-- NOTE: sqlFile is used only by sqlite database, and sqlKeepAlive by mysql database.
	-- To disable sqlKeepAlive such as mysqlReadTimeout use 0 value.
	sqlType = "mysql"
	sqlHost = "localhost"
	sqlPort = 3306
	sqlUser = "root"
	sqlPass = "secretpw"
	sqlDatabase = "euforia"
	sqlFile = "forgottenserver.s3db"
	sqlKeepAlive = 0
	mysqlReadTimeout = 10
	mysqlWriteTimeout = 10
	encryptionType = "plain"
 
Depends if you using mysql or sql, but i suspect you using sql so try now:

Code:
-- Database
	-- NOTE: sqlFile is used only by sqlite database, and sqlKeepAlive by mysql database.
	-- To disable sqlKeepAlive such as mysqlReadTimeout use 0 value.
	sqlType = "sqlite"
	sqlHost = "localhost"
	sqlPort = 3306
	sqlUser = "root"
	sqlPass = "secretpw"
	sqlDatabase = "euforia"
	sqlFile = "forgottenserver.s3db"
	sqlKeepAlive = 0
	mysqlReadTimeout = 10
	mysqlWriteTimeout = 10
	encryptionType = "plain"
 
Depends if you using mysql or sql, but i suspect you using sql so try now:

Code:
-- Database
	-- NOTE: sqlFile is used only by sqlite database, and sqlKeepAlive by mysql database.
	-- To disable sqlKeepAlive such as mysqlReadTimeout use 0 value.
	sqlType = "sqlite"
	sqlHost = "localhost"
	sqlPort = 3306
	sqlUser = "root"
	sqlPass = "secretpw"
	sqlDatabase = "euforia"
	sqlFile = "forgottenserver.s3db"
	sqlKeepAlive = 0
	mysqlReadTimeout = 10
	mysqlWriteTimeout = 10
	encryptionType = "plain"

im using mysql & with sql it come to loading map and then just random closes
 
then edit these things:

-- Database
-- NOTE: sqlFile is used only by sqlite database, and sqlKeepAlive by mysql database.
-- To disable sqlKeepAlive such as mysqlReadTimeout use 0 value.
sqlType = "mysql"
sqlHost = "localhost"
sqlPort = 3306
sqlUser = "root" --username to phpmyadmin
sqlPass = "secretpw" --pass to phpmyadmin
sqlDatabase = "euforia" --to your own database name
sqlFile = "forgottenserver.s3db"
sqlKeepAlive = 0
mysqlReadTimeout = 10
mysqlWriteTimeout = 10
encryptionType = "plain"
 
It should work, if your mysql is on and you wrote right information in the config
 
If you are using UniServer go to:

Code:
C:\UniServer\usr\local\php

Open php.ini and change:

Code:
[COLOR="#FF0000"];[/COLOR]extension=php_pdo_mysql.dll to extension=php_pdo_mysql.dll

Then restart UniServer or your computer.
 
This is the error when im using: http://otland.net/f18/9-60-9-61-forgotten-server-v0-2-14-mystic-spirit-166619/


[20/11/2012 18:55:06] >> Loading database driver...Failed to connect to database. MYSQL ERROR: Can't connect to MySQL server on 'localhost' (10061)
[20/11/2012 18:55:07] > ERROR: Failed to connect to database, read doc/MYSQL_HELP for information or try SQLite which doesn't require any connection.
 
Try with 127.0.0.1 instead of localhost

Code:
sqlHost = "[COLOR=#ff0000]127.0.0.1[/COLOR]"
 

Similar threads

Back
Top