How to reset admin password after deployment Umbraco 6.0.0
Hi everyone!
I'm trying to deploy preview of an Umbraco 6.0 website with it's database (using MySQL for db in this project)
I've published the files and made a sql backup, uploaded all the files to my web host and imported the data successfully to the db.
Now when I visit the site it want's me to publish my files, sure enough. I try to login using the password I set on the dev machine, but it doesn't work! So I thought maybe the hash is machine specific (?) so I did the whole thing with setting passwordFormat="Clear" and altered the password in the DB to blank and "default".. But nothing helps!
What can I try now? Could it be a connection error with the DB that still shows up as if the nodes are just not published? How can I verify my connection is cool?
No I'm not, however I see how that'd make things weird.. I'm trying to access the site from the www on a temporary address, so probably reason no nodes are shown has to do something with being on the wrong host, but the real issue is that the passwords don't work. Is the hash in Umbraco 6.0 machine specific or should I be able to pass the password around with the db between machines?
Sorry for my late reply, I got so frustrated with this issue, I went and did some other stuff for a couple of days :P
Yeah regarding the hostname, I'm thinking I'll fix that once I'm in the system, but out of couriosity, where is that set in the db? In the db i have the umbracodomains, but it's empty! Would that make "localhost" work on my dev machine?
And regarding the username and password, is faulty logins written to a log somewhere, so I can verify that it's testing my login correctly? Or some other means of verification that what I'm entering is what is transmitted? Or do you know if i can set my password to "1" and it'll work to login like that?
About the mapping of user to db, I changed both the db name and user name on my hosting machine, but is there some correlation to these names in the config or inside the db, other than in the connection string in the web.config?
2013-03-03 23:10:33,715 [163] WARN Umbraco.Web.UmbracoModule - [Thread 132] Umbraco has no content
2013-03-03 23:10:33,808 [163] ERROR umbraco.DataLayer.SqlHelper`1[[MySql.Data.MySqlClient.MySqlParameter, MySql.Data, Version=6.6.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d]] - [Thread 185] Error executing query select id from umbracoUser where userLogin = @login MySql.Data.MySqlClient.MySqlException (0x80004005): Table 'a2cdigi_gpromotion.UMBRACOUSER' doesn't exist
I think the devil in this case is the naming of the tables in the queries!
Check this out "select id from umbracoUser where userLogin"
But in my db, all tables are lower case, as well as column names.. I've been looking to see if this should really matter, and some say on one OS it does, and another it doesn't.. this doesn't help me all that much, but when i try running a query in my phpmyadmin, it actually doesn't give any result, but making all the table and column names lower case yelds a result!
Now HOW to fix it, anyone? MySQL database collation? Renaming all my tables?
I know I was digging my grave going for MySQL db in the first place.. But can I change now without redoing all my work?
Ok, so I figured out why the names are wrong at least..
On my dev machine, I run MySQL on Windows, and it seems over there MySQL is NOT case sensitive, while my host runs their hosted MySQL on Unix, which IS case sensitive..
It also turns out windows MySQL is not only case insensitive, but it actually lower cased all the table names automagically when they were created, this caused my .sql-export file (which i ran on my host db) to contain lower case names.
I'm trying to rename all the tables to use the correct names, see if that'll work..
SO after doing all names renaming all tables to camel case, it turns out they actually needed to be UPPERCASE, so I renamed all tables again. Now the db is doing its thing, but I get just bits of my data on the screen, and I still can't log in, I get these in my log-file:
2013-03-04 10:13:41,901 [4] INFO Umbraco.Core.Persistence.UmbracoDatabase - [Thread 65] at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
at Umbraco.Core.Persistence.Database.<Query>d__1c`1.MoveNext()
Does anyone know if this could cause me to not login and/or see my data?
Sorry for my delay in getting back to you. Seems like you figured out quite some things yourself in the above.
Usually I'm using either SQL CE or MSSQL so I'm not sure what's going on with MySQL other than there is some know issues with v6 and MySQL with the casing of the table names.
How to reset admin password after deployment Umbraco 6.0.0
Hi everyone!
I'm trying to deploy preview of an Umbraco 6.0 website with it's database (using MySQL for db in this project)
I've published the files and made a sql backup, uploaded all the files to my web host and imported the data successfully to the db.
Now when I visit the site it want's me to publish my files, sure enough. I try to login using the password I set on the dev machine, but it doesn't work! So I thought maybe the hash is machine specific (?) so I did the whole thing with setting passwordFormat="Clear" and altered the password in the DB to blank and "default".. But nothing helps!
What can I try now? Could it be a connection error with the DB that still shows up as if the nodes are just not published? How can I verify my connection is cool?
Thankful for any help!
Hi Niclas
Are you by any chance on a VPN connection? This has fooled me some times too but is usually caused by me being on a VPN.
/Jan
Hi Jan!
No I'm not, however I see how that'd make things weird.. I'm trying to access the site from the www on a temporary address, so probably reason no nodes are shown has to do something with being on the wrong host, but the real issue is that the passwords don't work. Is the hash in Umbraco 6.0 machine specific or should I be able to pass the password around with the db between machines?
Hi Niclas
In regards to accessing content you should just setup a temp hostname on the site root if you have not done so already. That should not be a problem.
In regards tot he password it should not be a problem switching between machines...but don't know if this perhaps is a bug?
Have you checked that the mapped user also exists in the live db?
/Jan
Hi Jan!
Sorry for my late reply, I got so frustrated with this issue, I went and did some other stuff for a couple of days :P
Yeah regarding the hostname, I'm thinking I'll fix that once I'm in the system, but out of couriosity, where is that set in the db? In the db i have the umbracodomains, but it's empty! Would that make "localhost" work on my dev machine?
And regarding the username and password, is faulty logins written to a log somewhere, so I can verify that it's testing my login correctly? Or some other means of verification that what I'm entering is what is transmitted? Or do you know if i can set my password to "1" and it'll work to login like that?
About the mapping of user to db, I changed both the db name and user name on my hosting machine, but is there some correlation to these names in the config or inside the db, other than in the connection string in the web.config?
HEY! I've got something here!
I think the devil in this case is the naming of the tables in the queries!
Check this out "select id from umbracoUser where userLogin"
But in my db, all tables are lower case, as well as column names.. I've been looking to see if this should really matter, and some say on one OS it does, and another it doesn't.. this doesn't help me all that much, but when i try running a query in my phpmyadmin, it actually doesn't give any result, but making all the table and column names lower case yelds a result!
Now HOW to fix it, anyone? MySQL database collation? Renaming all my tables?
I know I was digging my grave going for MySQL db in the first place.. But can I change now without redoing all my work?
Ok, so I figured out why the names are wrong at least..
On my dev machine, I run MySQL on Windows, and it seems over there MySQL is NOT case sensitive, while my host runs their hosted MySQL on Unix, which IS case sensitive..
It also turns out windows MySQL is not only case insensitive, but it actually lower cased all the table names automagically when they were created, this caused my .sql-export file (which i ran on my host db) to contain lower case names.
I'm trying to rename all the tables to use the correct names, see if that'll work..
SO after doing all names renaming all tables to camel case, it turns out they actually needed to be UPPERCASE, so I renamed all tables again. Now the db is doing its thing, but I get just bits of my data on the screen, and I still can't log in, I get these in my log-file:
Does anyone know if this could cause me to not login and/or see my data?
Hi Niclas
Sorry for my delay in getting back to you. Seems like you figured out quite some things yourself in the above.
Usually I'm using either SQL CE or MSSQL so I'm not sure what's going on with MySQL other than there is some know issues with v6 and MySQL with the casing of the table names.
Perhaps the comment from Tom Sommer in this issue can help you further? http://issues.umbraco.org/issue/U4-1632
/Jan
is working on a reply...