我试图在我的机器(Windows 7)上安装和测试MySQL ODBC连接器以连接到远程MySQL数据库服务器,但是,当我配置和测试连接时,我不断收到以下错误:
Connection Failed
[MySQL][ODBC 5.3(w) Driver]Access denied for user 'root'@'(my host)' (using password: YES):
Run Code Online (Sandbox Code Playgroud)
问题是,我可以连接MySQL Workbench(远程 - 从我的本地机器到远程服务器)就好了.我已经广泛阅读了这个FAQ,但它没有帮助.我试过了:
令人沮丧的是,我可以在本地计算机上连接MySQL Workbench(使用相同的IP /用户/密码),而不是使用ODBC.
我可能做错了什么,或者什么可能搞乱我尝试连接ODBC?
更新:我设法设置ODBC驱动程序并使其在服务器端正常运行.我可以使用命令行(使用"isql"命令)将其连接到localhost.但我仍然无法通过Windows 7机器远程连接.
我有一个用Ionic/Cordova构建的简单应用程序.在每个页面中,我想创建一个简单的"返回"块按钮 - 用户可以按下它以转到应用程序中的上一页.
我正在考虑使用$ ionicHistory来做这件事.但是,$ ionicHistory.goBack()方法不起作用.
我目前正在使用通常的window.history.back()代替,这有效,但我不明白为什么离子方法不能像它应该的那样工作.
以下是代码视图:
<button class="button button-block button-assertive" ng-click="goBackHandler()">
Go Back
</button>
Run Code Online (Sandbox Code Playgroud)
这是控制器:
angular.module('starter.controllers', ['ionic'])
.controller('AppCtrl', function($scope, $ionicHistory)
{
$scope.goBackHandler = function()
{
$ionicHistory.goBack(); //This doesn't work
//window.history.back(); //This works
//alert('code to go back called. Did it work?'); //For testing
}
});
Run Code Online (Sandbox Code Playgroud)
这应该是非常简单的.我能错过什么?
编辑:Plunker在这里 - http://plnkr.co/yJqdfs
我有一个带有全局变量的Windows窗体应用程序 - 一个名为的字符串testPath.
此字符串用于保存路径 - 默认情况下C:\temp\.当用户单击按钮时,将创建此目录(如果它尚不存在).
如果用户想要更改路径的值,还有一个文本框控件.
在按钮的事件处理程序中,我尝试访问testPath并获得空引用.
我没有改变testPath任何地方的值,除非我将它传递给文本框Control和从文本框Control传递.
我究竟做错了什么?全局变量如何在一秒内有内容,然后在之后它指向空引用?
这是完整的代码:
public string testPath = @"C:\temp\";
public MainForm()
{
//Windows Designer call
InitializeComponent();
//Show the testPath in the textBox (using Invokes)
this.textBox1.Invoke(new MethodInvoker(delegate { this.textBox1.Text = testPath; } ));
//here, testPath contains 'C:\temp\'
}
//Button "Click" handler
private void Button1Click(object sender, EventArgs e)
{
//here, testPath contains a null reference!
//If the user changed testPath in the textBox, we need to save …Run Code Online (Sandbox Code Playgroud)