WebMatrix错误“用户帐户的指定密码'root'无效...”

时间:2022-12-12 16:48:44

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

当我从'App Gallery'创建一个新的Joomla,Drupal或任何涉及数据库的网站时,我得到错误:

MySQL

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

“用户帐户'root'的指定密码无效,或无法连接到数据库服务器”

SQL Server

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

“用户帐户'sa'的指定密码无效,或无法连接到数据库服务器”

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.

可以采取哪些措施来阻止此错误发生?我不相信数据库,我责怪WebMatrix,因为这对于两个数据库来说都是同样的问题。

Thanks in advance

提前致谢

4 个解决方案

#1


3  

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

我遇到了同样的问题,我执行了以下步骤来解决问题:

  1. Open Sql Server Management Studio as Administartor

    以管理员身份打开Sql Server Management Studio

  2. Login to .\SQLEXPRESS using Windows Authentication

    使用Windows身份验证登录。\ SQLEXPRESS

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

    转到安全选项卡 - >登录 - >更改“sa”密码,然后按确定

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

    在WebMatrix中使用新创建的密码,您应该全部设置。

#2


0  

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.

对于SQL Server,我认为当您使用WebMatrix安装Joomla时,默认数据库是。\ SQLExpress,因此“sa”是。\ SQLExpress的用户。您应该检查密码。

#3


0  

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.

我按照这里的指示:http://www.microsoft.com/web/post/understanding-mysql-errors-when-installing-web-apps-in-webmatrix解决了这个问题。

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

你不仅需要卸载MySQL,还要删除文件夹\ ProgramData \ MySQL

as the password details are cached there.

因为密码详细信息在那里缓存。

#4


0  

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

对于MySQL问题:请按照以下步骤重置root密码。

  1. Stop the MySQL server if it is running.

    如果MySQL服务器正在运行,请将其停止。

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

    创建包含新密码的文本文件并保存到某个位置。内容为:ALTER USER'root'@'localhost'ENFENTIFIED BY'MyNewPass';

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

    使用cmd启动MySQL客户端命令行,然后输入

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

    C:> cd“C:\ Program Files \ MySQL \ MySQL Server 5.7 \ bin”

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

    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.

现在,您可以使用上面提供的新密码继续安装Web Platform Installer。

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

#1


3  

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

我遇到了同样的问题,我执行了以下步骤来解决问题:

  1. Open Sql Server Management Studio as Administartor

    以管理员身份打开Sql Server Management Studio

  2. Login to .\SQLEXPRESS using Windows Authentication

    使用Windows身份验证登录。\ SQLEXPRESS

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

    转到安全选项卡 - >登录 - >更改“sa”密码,然后按确定

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

    在WebMatrix中使用新创建的密码,您应该全部设置。

#2


0  

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.

对于SQL Server,我认为当您使用WebMatrix安装Joomla时,默认数据库是。\ SQLExpress,因此“sa”是。\ SQLExpress的用户。您应该检查密码。

#3


0  

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.

我按照这里的指示:http://www.microsoft.com/web/post/understanding-mysql-errors-when-installing-web-apps-in-webmatrix解决了这个问题。

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

你不仅需要卸载MySQL,还要删除文件夹\ ProgramData \ MySQL

as the password details are cached there.

因为密码详细信息在那里缓存。

#4


0  

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

对于MySQL问题:请按照以下步骤重置root密码。

  1. Stop the MySQL server if it is running.

    如果MySQL服务器正在运行,请将其停止。

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

    创建包含新密码的文本文件并保存到某个位置。内容为:ALTER USER'root'@'localhost'ENFENTIFIED BY'MyNewPass';

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

    使用cmd启动MySQL客户端命令行,然后输入

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

    C:> cd“C:\ Program Files \ MySQL \ MySQL Server 5.7 \ bin”

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

    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.

现在,您可以使用上面提供的新密码继续安装Web Platform Installer。

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