Jump to content
  • 0

mangostwo DB setup - Possible Issue with code in InstallDatabases.sh - Access denied for user 'mangos'@'localhost' (using password: YES)



I have successfully cloned, built, installed the mangostwo project and extracted all of the map data (I think). However, I am hitting a snag on the DB setup. 

I am using this guide: 

I've installed mysql-server with 

sudo apt install mysql-server

Then I switched to root and loaded up mysql to do this command (which, BTW, "privileges" is misspelled in the guide:

CREATE USER 'mangos'@'localhost' IDENTIFIED BY 'mangos';

I exited, and did 

cd /home/mangos/db/
git clone https://github.com/mangoszero/database.git . --recursive --depth=1

(in the guide, the pictures are dead links, so I can't see what Database options to use, but I did mysql host name = localhost, mysql user name = mangos, mysql port = 3306, then I typed in my mangos linux user's password (which I also manually set the mangos mysql user's password to).  Then I did all of the default database names.

Then, I get a big string of these errors:

Importing file World/Setup/FullDB/spell_learn_spell.sql
ERROR 1045 (28000): Access denied for user 'mangos'@'localhost' (using password: YES)
File World/Setup/FullDB/spell_learn_spell.sql imported
Importing file World/Setup/FullDB/spell_loot_template.sql
ERROR 1045 (28000): Access denied for user 'mangos'@'localhost' (using password: YES)
File World/Setup/FullDB/spell_loot_template.sql imported

I looked at the InstallDatabases.sh script, and I feel like there is an issue.

printf "What is your MySQL host name ?\t[${svr_def}]: "
read svr
printf "What is your MySQL user name ?\t[${user_def}]: "
read user
printf "What is your MySQL port ?\t[${port_def}]: "
read port
printf "What is your MySQL password ?\t [], "
mysql_config_editor set --login-path=local --host=${svr} --port=${port} --user=${user} --password --skip-warn
if [ "${DUMP}" = "YES" ]; then
        printf "Enter it again \t[]: "
        read pass

Here is the prompt for password. 1) It looks like the script doesn't even store the password in a variable. And 2) mysql_config_editor DEFINITELY prompts the user for a password if you use the --password flag like that. So... I feel like I'm totally missing something.  Thoughts?

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

@lauren_eily @fulton97.dm

Access denied for user 'mangos'@'localhost'

This error is a permission issue.
Specifically, user mangos@localhost does not have permission to access the database

To test this, change your .conf files to use the user root and the password used when installing mysql.

As I side note, I moved from Mysql to MariaDB earlier this year and have never looked back. MySQL 8.x is an utter mess.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use