Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 04-19-2014, 05:43 PM
erog84
Fire Beetle
 
Join Date: May 2011
Posts: 4
Default ERROR 1045, Access denied for user 'root'

I saw other threads that had the same issue, but none of the fixes applied there are seeming to work for me. I have a batch file that is supposed to launch the server but am having issues there. Currently root does not have a password in mysql, I can log in via command window without using one, and if I try using one, it won't work. I have a screenshot of the errors, but since I can't post attachments I will type it up.

Error in DOS window after running batch file to start server
Code:
Status Starting Log: logs/eqemu_shared_memory_4560.log
Status Shared Memory Loader Program
Status Connecting to database...
Error Starting Log: logs/eqemu_error_shared_memory_4560.log
Error Failed to connect to database: Error: #1045: Access denied for user 'root'@'localhost' (using password: YES)
Error Unable to connect  to the database, cannot continue without a database connection
waiting for the world to finish before starting zone...

My config file has the following:
Code:
<database>
	<host>localhost</host>
	<port>3306</port>
	<username>root</username>
	<password></password>
	<db>peq</db>
</database>
If anyone that knows much about this doesn't mind doing a skype/dolbyx(or I can install another program) I would really appreciate it (also posting possible fixes works too!). And currently this will be a local server, if I open it up to friends, I will be adding a password onto root

Last edited by erog84; 04-19-2014 at 05:44 PM.. Reason: wrong tags
Reply With Quote
  #2  
Old 04-19-2014, 07:21 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

It's a database connection error. You probably have a password on the root account, which must be present there if you do.
Code:
Error Failed to connect to database: Error: #1045: Access denied for user 'root'@'localhost' (using password: YES)
That means it has a password, but you're giving it the wrong one, currently just "".
Reply With Quote
  #3  
Old 04-19-2014, 07:38 PM
erog84
Fire Beetle
 
Join Date: May 2011
Posts: 4
Default root password

When I open up a dos command window and go connect to the mysql server

"mysql -u root " this works just fine, but if I try to give it a password it fails. Is there any other way to verify if I have a password on it? I did a query for password column for root user and it returned 3 values (they are just long random strings).
Reply With Quote
  #4  
Old 04-19-2014, 08:14 PM
sarxosen's Avatar
sarxosen
Fire Beetle
 
Join Date: Oct 2006
Location: Nebraska, USA
Posts: 7
Default

login to mysql as you did with no root password. type the following, replacing the myrootpw with whatever password you want.

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('myrootpw');

then put the password in your config file. its not worth running without a root pw, even if you make it really simple. give it a try.
Reply With Quote
  #5  
Old 04-19-2014, 08:17 PM
erog84
Fire Beetle
 
Join Date: May 2011
Posts: 4
Default fixed

Thanks man, that got it. Really appreciate the assistance.
Reply With Quote
  #6  
Old 05-02-2014, 10:36 PM
Valorborn
Fire Beetle
 
Join Date: Aug 2010
Location: Texas
Posts: 21
Default

Where is the config file in question located at? Also the 1045 error message says the password it is trying to use is YES, if I reset the uroot password to YES will it just work?

Respectfully,


Ephron
Reply With Quote
  #7  
Old 05-03-2014, 12:57 AM
Valorborn
Fire Beetle
 
Join Date: Aug 2010
Location: Texas
Posts: 21
Default

1) I opened the my.ini file through XAMPP and selected 'config'. I did a ctrl + F for password but none of the matches where on a line that wasn't a comment.

I stopped the sql service and closed XAMPP - no change on restart

2) I clicked on explorer in XAMPP and saw a passwords.txt file in the XAMPP install directory. Top of the file had user: root and password (blank) so I set that to my uroot password.

I stopped the sql service and closed XAMPP - no change on restart

3) I read the readme file in the SQL folder but the little I could understand from it didn't seem to be relative to a 1045 error.

4) I checked world.exe's permissions under security and gave everyone full control - no change.


I'm going to keep working at it, hopefully I'll find the answer before someone posts it. I mean, database administration isn't too different from domain administration right =P shouldn't be too hard.
Reply With Quote
  #8  
Old 05-03-2014, 01:18 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

I googled for 'set root password xampp' and found https://www.apachefriends.org/faq_windows.html which explains exactly how to do it.

Don't use 'YES' as your password, that isn't what the error is telling you.
Reply With Quote
  #9  
Old 05-03-2014, 01:47 AM
Valorborn
Fire Beetle
 
Join Date: Aug 2010
Location: Texas
Posts: 21
Default

lerxst2112 the setup guide has you run the command: SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your_pasword'); which worked as I was able to build the database in the later steps.

I can access the database with the command: mysql -uroot -pyourpassword peq with out issue (I set a password), but I am going to run the comand in the XAMPP guide you sent me.

Edit:
I ran "mysqladmin.exe -u root password secret" where I changed 'secret' to a new password and I still receive Error: #1045

Thanks for the attempt though man.

On a side note, if i select Shell from XAMPP Control Panel the prompt and run the above command returns Access denied for user 'root'@'localhost' (using password: NO)' but the same command did not return an error from a cmd prompt opened from the start menu.

Also: http://localhost/phpmyadmin/ and /security windows open as blank pages. (the page was blank because skype was using port 443 and it wouldn't let apache start) After I closed skype the page came up with "ACCESS DENIED Error: 1045)

As this was an XAMPP issue it was easy to find an answer: http://www.ostraining.com/blog/codin...45-phpmyadmin/

I corrected the localhost/phpadmin issue by editing the password in config.inc.php and was able to access the php admin console. I see what was meant by the password used =yes or no. So I went into the users area and changed the password of the localhost that had a password set to YES to the password I set for my sql root account. I also made a new user account named eq@localhost (my 1045 error says access denied to eq@localhost) then i stopped and restarted sql, apache, and XAMPP, and that didn't work so I restarted my computer. That didn't work either so I came back to update my post with my new failure.
Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

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


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3