EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   Allaclone Mysql Error: Access denied for user 'root'@'localhost' (using password:YES) (https://www.eqemulator.org/forums/showthread.php?t=35429)

GLGanjika 06-18-2012 08:05 AM

Allaclone Mysql Error: Access denied for user 'root'@'localhost' (using password:YES)
 
The Error i get when trying to navigate to _____.com/allaclone
Code:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in C:\AppServ\www\AllaClone\includes\config.php on line 97
Impossible to connect to localhost : Access denied for user 'root'@'localhost' (using password: YES)

Allaclone Config.
Code:

<?php

$SiteTitle='EQEmu Server AllaClone';
$ServerName='EQEmu Server';
$cfgversion='2.0.1 - Rev2103';
$SiteEmail='';

$dbhost="localhost";
$dbname="peq";
$dbuser="root";
$dbpasswd="*Censored*";

$root_url='http://68.43.175.133/AllaClone/';
$includes_url=$root_url.'includes/';
$includes_dir=getcwd()."/includes/";
$eqemu_dir="/home/eqemu/server/";
$quests_dir=$eqemu_dir."quests/";
$quests_datas="/home/eqemu/server/quests/";
$maps_dir=getcwd()."/maps/";
$maps_url=$root_url."/maps/";
$npcs_dir=getcwd()."/npcs/";
$npcs_url=$root_url."/npcs/";
$icons_dir=getcwd()."/icons/";
$icons_url=$root_url."/icons/";
$images_url=$root_url."/images/";
$charbrowser_url="http://68.43.175.133/CharBrowser/"; // Set to "" to disable CharBrowser links for character names


$DefaultCSS = "allakhazam";

// Available Styles - ( allakhazam, dark_blue )
if(isset($_COOKIE["Theme"]))
{
        if($_COOKIE["Theme"] == "Dark Blue")
        {
                $CssStyle = "dark_blue";
        }
        if($_COOKIE["Theme"] == "Allakhazam")
        {
                $CssStyle = "allakhazam";
        }
        else
        {
                $CssStyle = $DefaultCSS;
        }
}
else
{
        $CssStyle = $DefaultCSS;
}

// OPTIONS
$ServerMaxLevel=80; // Max Level for Characters on the Server
$ServerMaxNPCLevel=95; // Max Level for any NPCs on the Server
$MaxResultsPerPage=15; // Max number of results per page for results that are paged
$AdjacentPages=3; // How many adjacent pages to show for the pages bar
$MaxItemsReturned=50; // max number of items returned by search engines (0=all)
$MaxNpcsReturned=50; // max number of npcs returned by search engines (0=all)
$SpawngroupAroundRange=100; // range of surrounding spawngroups, spawngroups page
$EnableNews=TRUE; // If TRUE, it enables the use of the News (requires SQL Source includes/sql/news.sql)
$ShowNpcDropChances=TRUE; // if TRUE, chances of droping of each item will be shown when browsing npcs
$MerchantsDontDropStuff=TRUE; // if TRUE, you won't see merchants drops, damned PEQ word builders ! :)
$ShowNPCNumberInZoneLevelList=TRUE; // choose between number and x for npcs in zone levels list
$SortZoneLevelList=TRUE; // sort or not the zones in zone levels list
$AllowQuestsNPC=FALSE; // quests for npcs are available from NPC's page
$AlwaysBuildQuest=FALSE; // rebuilds the quest each time a visitor browse it, put false if you don't modify them anymore
$GroupNpcsByName=TRUE; // groups the NPCs by their name in zone npcs lists
$HideInvisibleMen=TRUE; // hide the invisible mens in bestiaries
$ItemAddChanceToDrop=TRUE; // shows what are the chances to see the item droped by the npcs
$ShowNpcsAttackSpeed=TRUE; // shows informations about NPCs' attack speed
$ShowNpcsAverageDamages=TRUE; // How much NPC does as melee damages, in average, this allows to comparate mobs together
$DisplayNamedNPCsInfo=TRUE; // If TRUE, will display a link to show named NPCs and export to CVS for maps
$DisplayNPCStats=TRUE; // If TRUE, will display HP, Damage, Special Attacks, etc for NPCs
$TrackableNPCsOnly=TRUE; // If TRUE, will only display NPCs that are set to be trackable in search results
$DisplaySpawnGroupInfo=TRUE; // If TRUE, will display the spawngroup link from the zone pages
$DisplayTaskInfo=TRUE; // If TRUE, will allow search results to show tasks and rewards
$DisplayTaskActivities=TRUE; // If TRUE, will display all task activities
$AllowCSVOutputOptions=FALSE; // If TRUE, will display CSV output button for searches that allow them
$ItemFoundInfo=TRUE; // If TRUE, it displays where items can drop or be purchased (longer item page load times)
$MaxRecentlyDiscoveredItems=25; // Max number of recently discovered items to display
$DiscoveredItemsMaxStatus=20; // Max account status for a discovered item entry
$DiscoveredItemsOnly=FALSE; // If TRUE, only Discovered Items will be displayed
$UseSpellGlobals=FALSE; // If TRUE, any spells in the spell_globals table will not be displayed
$UseZAMSearch=TRUE; // If TRUE, will display a ZAM search bar on the left with the sidemenu

$UseCustomZoneList=FALSE; // If TRUE, will display only the custom zone list in the menu, otherwise it displays all but custom.
// For custom zone lists, set the file_name field of the zone table to a number (in the order you want them displayed)
// Then, set the notes field in the zone table to the note you want for the zone such as "Raid Tier1"
// You can block any zones from the custom zone list by adding "disabled" anywhere in the notes field

$ShowHeader=TRUE; // Shows the page header for each page
$UseWikiImages=FALSE; // Use Wiki added images for NPCs and other (not in use yet)
$IgnoreZones=array("load","loading","load2","nektropos","arttest","apprentice","tutorial");
$ShowAccount=FALSE; // (not in use yet)
$ShowCharacters=FALSE; // (not in use yet)

$db=mysql_connect($dbhost,$dbuser,$dbpasswd) or die("Impossible to connect to $dbhost : ".mysql_error());
mysql_select_db($dbname,$db) or die("Impossible to select $dbname : ".mysql_error());

?>

Any ideas? I'm fairly sure the perms are right on this but it gets access denied. any ideas? :-?

Uleat 06-18-2012 08:28 AM

Pretty sure that error comes up when you don't set the database info in the php config file.

Getting this to work can be tricky if you don't know anything about php or apache (if you're using that.)


U

GLGanjika 06-18-2012 09:02 AM

Quote:

Originally Posted by Uleat (Post 210345)
Pretty sure that error comes up when you don't set the database info in the php config file.

Getting this to work can be tricky if you don't know anything about php or apache (if you're using that.)


U

Adjusted the config.php.dist as well and still no luck.

Uleat 06-18-2012 09:40 AM

I'm not at home to check on my server computer atm..but isn't there a config.php file as well? Php shouldn't use
the *.dist file unless you rename it.

Renaming an extension in windows can be tricky. You'll have to turn on 'show file extensions' under folder options.
Then you can change the file name and delete the '.dist' if you don't already have a file with the new name.


U

GLGanjika 06-18-2012 09:58 AM

It has both a php and php.dist the only other php is like menu.php or whatnot.
I made the changes to both of the files to be safe and still no dice. :(

Uleat 06-18-2012 10:19 AM

I'll post the changes that I made to mine later this evening if no one has suggested a fix yet. There's still several things it could be
regarding php and apache versions, though I don't think you would get that far with a version-related issue.

Try changing 'localhost' to '127.0.0.1' and see if that helps.


U

GLGanjika 06-18-2012 10:30 AM

http://i1127.photobucket.com/albums/...mysqlerror.png

This is the error i get.

GLGanjika 06-18-2012 09:19 PM

Quote:

Originally Posted by GLGanjika (Post 210352)



Any ideas anyone? :confused:

lerxst2112 06-18-2012 10:01 PM

Bumping it is not going to win you any friends and might result in whoever could help you choosing not to. If someone hasn't seen it and they read new messages they will, be patient.

GLGanjika 06-18-2012 10:53 PM

Quote:

Originally Posted by lerxst2112 (Post 210376)
Bumping it is not going to win you any friends and might result in whoever could help you choosing not to. If someone hasn't seen it and they read new messages they will, be patient.

accidentally posted trying to edit in the second comment :'(

on the original note - as an update: i'm still open to any suggestions onto what the problem listed above is but I think it has to do with mysql ; last time i had a problem like this it was to do with starting the server and it was something small and benign - wish i could remember what it was, in the long range, this may or may not be the same thing. :S

I had a second install or magelo and it gave me a database error but didnt give me the error. in all cases mysql wont let that user in, when i tried to grant user all privs it said i had a database error or something. syntax error.

wolfwalkereci 06-18-2012 11:52 PM

check php.ini -> extension=php_mysql.dll

Uleat 06-19-2012 01:51 AM

(A little overkill, but helpful to anyone searching in the future.)

You can always use the root:Password combo for testing and then switch back to the limited-access client once it works.

It is something small..and php install doesn't seem to make all three of the needed apache line additions..just the two.


If you're using apache/php, make sure that you have the compatible versions of each based on the OS that you're using.
(Apache Lounge has the VC6 build that is compatible with 32-bit Win OS's..and make sure you read up on using the
thread-safe versus non-thread safe versions of apache.)


If you're getting the 'can't load' certain module errors, this website gives a decent idea of what php options need to be
checked on install:
http://www.websiteadministrator.com....hp533_pg5.html


Apache needs to properly configure as well, and I'm assuming that you have that right. You should be able to access the
default 'index.html' if apache is working.

However, when installing php, the installer only makes these changes to the apache config file:
Code:

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir ""
LoadModule php5_module "php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

One more line needs to be added (make sure the references match the version of php that you're using.) This is what mine looks like:
Code:

PHPIniDir "C:/PHP"
LoadModule php5_module "C:/PHP/php5apache2_2.dll"
AddType application/x-httpd-php .php

That 'AddType' is usually what kills an otherwise 'clean' install... (I forced the phpinidir on my system to facilitate some
troubleshooting I had to do. Not sure if that is absolutely needed, but doesn't break it.)


Let us know if any of this helped or if you're still having issues.
(Don't forget to restart the server once you make the config changes.)


U

trevius 06-19-2012 02:46 AM

What OS are you on, Windows or Linux? Also, have you tried using a tool like Navicat that you can try connecting to your database with to verify your connection info is correct? If it doesn't work for Navicat with the same info, it probably won't work for AllaClone.

Also, I would recommend creating a new user in MySQL for the AllaClone. You can restrict the new account to SELECT only to reduce security risks.

GLGanjika 06-19-2012 10:02 AM

Quote:

Originally Posted by Uleat (Post 210384)
(A little overkill, but helpful to anyone searching in the future.)

You can always use the root:Password combo for testing and then switch back to the limited-access client once it works.

It is something small..and php install doesn't seem to make all three of the needed apache line additions..just the two.


If you're using apache/php, make sure that you have the compatible versions of each based on the OS that you're using.
(Apache Lounge has the VC6 build that is compatible with 32-bit Win OS's..and make sure you read up on using the
thread-safe versus non-thread safe versions of apache.)


If you're getting the 'can't load' certain module errors, this website gives a decent idea of what php options need to be
checked on install:
http://www.websiteadministrator.com....hp533_pg5.html


Apache needs to properly configure as well, and I'm assuming that you have that right. You should be able to access the
default 'index.html' if apache is working.

However, when installing php, the installer only makes these changes to the apache config file:
Code:

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir ""
LoadModule php5_module "php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

One more line needs to be added (make sure the references match the version of php that you're using.) This is what mine looks like:
Code:

PHPIniDir "C:/PHP"
LoadModule php5_module "C:/PHP/php5apache2_2.dll"
AddType application/x-httpd-php .php

That 'AddType' is usually what kills an otherwise 'clean' install... (I forced the phpinidir on my system to facilitate some
troubleshooting I had to do. Not sure if that is absolutely needed, but doesn't break it.)


Let us know if any of this helped or if you're still having issues.
(Don't forget to restart the server once you make the config changes.)


U

http://i1127.photobucket.com/albums/...rrorsyntax.jpg

I got this error when trying to make give root all privs AND when trying to create a new user :(.

Btw where was i supposed to make the changes shown in the last codebox? the php config file didnt have anything like that in there.


Quote:

Originally Posted by trevius (Post 210386)
What OS are you on, Windows or Linux? Also, have you tried using a tool like Navicat that you can try connecting to your database with to verify your connection info is correct? If it doesn't work for Navicat with the same info, it probably won't work for AllaClone.

Also, I would recommend creating a new user in MySQL for the AllaClone. You can restrict the new account to SELECT only to reduce security risks.



Windows 7 Home Premium 64 Bit.
There are TWO mysqls (seems unnecasary but it was how i knew how to run this properly with what was shown in the guide, one mysql is for website/forum/teamspeak/etc (app serv 2.5.10) and the other is mysql 5.1 (this is for the eq server). i used -this guide- to run this server and followed it as closely as i could. Yes I can connect via navicat and even into the game and others can connect to my server in-game too.

lerxst2112 06-19-2012 11:54 AM

http://dev.mysql.com/doc/refman/5.1/en/grant.html

You spelled PRIVILEGES wrong. Easier to just say "GRANT ALL ON *.* TO 'someuser'@'somehost';" Of course, root should already have them.


All times are GMT -4. The time now is 03:58 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.