简体   繁体   中英

WebMatrix error “The specified password for user account 'root' is not valid…”

When creating a new Joomla, Drupal or any website involving a database from the 'App Gallery', I get the errors:

MySQL

" The specified password for user account 'root' is not valid, or failed to connect to the database server "

SQL Server

" The specified password for user account 'sa' is not valid, or failed to connect to the database server "

What can be done to stop this error occurring? I don't believe it's with the databases, I blame WebMatrix because it's the same problem for both DBs.

Thanks in advance

I had the same problem and i performed the below steps to resolve the issue:

  1. Open Sql Server Management Studio as Administartor

  2. Login to .\\SQLEXPRESS using Windows Authentication

  3. Go to Security Tab -- > Logins --> Change the "sa" password and Press Ok

  4. Use the newly created Password in WebMatrix and you should be all Set.

In the case of SQL Server, I think the default database is the .\\SQLExpress when you using WebMatrix to install Joomla, so the "sa" is the user of .\\SQLExpress. You should check the password for that.

I followed the directions here: http://www.microsoft.com/web/post/understanding-mysql-errors-when-installing-web-apps-in-webmatrix and it fixed this issue.

You need to not only uninstall MySQL, put also delete the folder \\ProgramData\\MySQL

as the password details are cached there.

For MySQL problem: Follow these steps to reset the root password.

  1. Stop the MySQL server if it is running.

  2. Create a text file containing the new password and save to a place. The content is: ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';

  3. Start the MySQL Client Command Line by using cmd, then input

    C:> cd "C:\\Program Files\\MySQL\\MySQL Server 5.7\\bin"

    C:> mysqld --init-file=C:\\mysql-init.txt

  4. After the server has started successfully, delete the text file.

Now you can use the new password that you provided above to continue the installation of Web Platform Installer.

References: http://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM