Closed FabianN closed 12 years ago
Try placing your password in single quotes in the config file. I've had this problem with several plugins so far... placing the password (or username as the case my be) in single quotes almost always fixes it.
The yaml spec. allows you to leave out the single quotes and it will try to figure out what data type you want... however sometimes, depending on implementation, it will treat something as an integer when it should be a string. passwords with numbers in them are particularly prone to this. In fact the yaml spec states you should always use single quotes with strings... even though not using them works... most of the time.
Also yaml has a fair amount of special characters (one of them being %)... but if you place the string in question inside single quotes it will treat them as plain ascii characters.
I place the info in single quotes, but after loading the plugin the single quotes are stripped from the config file.
Example of what I save:
help_ticket:
notify_delay: 20
min_word_count: 3
mysql:
server:
address: localhost
port: 3306
database:
name: 'minecraft'
database:
username: 'minecraft'
password: 'password'
table_prefix: 'helpticket_'
name: 'minecraft'
And after loading the server it changes to this:
help_ticket:
notify_delay: 20
min_word_count: 3
mysql:
server:
address: localhost
port: 3306
database:
name: minecraft
database:
username: minecraft
password: password
table_prefix: helpticket_
name: minecraft
And I still get the exact same error as before. :(
Escaping the characters with single quotes as jadeddragoon said will work on 1.6, just tested it myself. If your password does not contain any "special" characters and you escape it, the quotes will be removed, however if your password contains something like '%!pass123@!' or any other combination of special characters, the quotes will stay. Also just for your information the node 'mysql.server.database.name' is not needed, you can remove it. Its the same as 'mysql.database.name' i just made a typo.
Mail however was using the old method of a yaml file so thats been update, check if you can load mail without this issue
I ended up changing the password and now it works. I had updated to 1.6, and I had reset the config files. I am guessing that one (or both) of these symbols was causing an issue: & %
I am trying to install and setup your plugin but it seems like the MySQL password is getting rejected.
Thing is, I have confirmed that the login credentials work. The same login info works for other plugins, it works for command-line connection from the local machine, works for remote connection, and works via phpmyadmin. Only for this one plugin does it not work (Oh, and also your mail plugin seems to have the same issue, but that seems to be dependent of the HelpTicket plugin working in the first place).
I even tried giving the plugin the root login credentials to see what would happen, same error.
I have a handful of other plugins already working off of MySQL. I don't understand why this one wouldn't, unless maybe you are not parsing characters correctly. The minecraft MySQL pass has these characters: Upper-case letters, lower-case letters, numbers, &, %