重新安装wamp服务器后出现未知数据库问题

时间:2016-02-27 10:19:00

标签: laravel-5 wampserver

在使用wamp服务器出现问题后,我已经卸载了它,并通过移动www文件夹并再次下载wamp而犯了一个错误。

所以在安装wamp并修复我遇到的问题后,我的项目(使用laravel)不再起作用了:

import {Component} from 'angular2/core';
import {Http, HTTP_PROVIDERS} from 'angular2/http';

@Component({
    selector: 'my-app',
    viewProviders: [HTTP_PROVIDERS],
    templateUrl: 'app/main.html'
})

export class LeadsList {
    constructor(http: Http) {} // This line is causing the error.
}

// Throws the error: Uncaught SyntaxError: Unexpected token < in the file angular2-polyfills.js:1243

我试过SQLSTATE[HY000] [1049] Unknown database 'db_name' 但没有改变

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

问题是Laravel无法找到数据库。也许你忘了恢复你的数据库?卸载WAMP,你已经删除了所有数据库的MySQL(WAMP中的M代表MySQL)。

或者您可能忘记在.env文件中设置数据库主机,用户和密码。

相关问题