我不小心做了一些愚蠢的事情,并在mysql控制台中输入了以下内容:
mysql> grant all on myDB.* to root@'%' identified by 'root';
..。并且数据库配置对远程登录开放。现在,我需要删除此授权,但不希望意外地撤销我的root用户的所有特权,并有效地将我自己锁定在db admin之外。我该怎么办?
mysql -u user -p pass -h remotehost
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 96
Server version: 5.1.36-community-log MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysq
我刚买了Coda 2,我想试一下mysql数据库连接的这个功能。我无法连接。出现的错误是:
Unable to connect to host 1.2.3.4, or the request timed out.
Be sure that the address is correct and that you have the necessary privileges,
or try increasing the connection timeout (currently 0 seconds).
MySQL said: Can't connect to MySQL server on
当我试图通过远程MySQL服务器上的本地计算机的外壳连接时,我可以成功地连接:
> mysql -h remotehost -u myuser -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
但是,当我试图通过PHP脚本连接时,使用
$serverName = "remotehost"; // here I put the actual IP address
$userName = "myuser";
$passCode = "actualpa
安装gestioip时出现此错误。它以root用户身份连接到数据库,创建一个DB (gestioip db),然后创建一个用户( users: gestioip),但该用户不能访问数据库。(所有这些都是通过远程机器上的浏览器实现的) 我尝试过类似的帖子,如下所述: GRANT ALL PRIVILEGES ON dbname.* TO 'gestioip'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES; 没有给出主题上存在的错误的效果。如果我使
远程连接到我的MySQL服务器时出现问题。我知道我的用户在任何主机上都设置了通配符'%‘,所以我应该有权访问服务器。我可以使用凭据在本地登录MySQL服务器,但不能远程登录。
我在my.cnf中的设置如下所示:
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld]
user = mysql
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir
我知道这个命令:
GRANT ALL PRIVILEGES
ON database.*
TO 'user'@'yourremotehost'
IDENTIFIED BY 'newpassword';
但是,它只允许我授予一个特定的IP地址来访问这个远程MySQL数据库。如果我想让任何远程主机都可以访问这个MySQL数据库,该怎么办?我该怎么做?基本上,我将这个数据库公开,这样每个人都可以访问它。
我想通过c#远程连接到其他安装了mysql的电脑上。
我收到以下错误"Host 'dhycp-157-96.ist.com' is not allowed to connect to this MySQL server"
在我想要连接的服务器上,我为我的用户提供了所需的权限。
GRANT ALL PRIVILEGES ON *.* TO 'sa'@localhost;
FLUSH PRIVILEGES;
连接字符串如下所示:
string connStr = "server=" + host +
我有一个MySQL数据库,我想从远程机器连接到它。我已经注释掉了/etc/mysql/my.cnf中的绑定地址,以允许远程连接。在本地机器上,我现在可以登录到MySQL
mysql --host=[SERVER_IP] --user=[USER] --password=[PASSWORD] [DATABASE]
效果很好。但是,我不能用我的笔记本电脑登录。这里我有个错误
ERROR 2003 (HY000): Can't connect to MySQL server on [SERVER_IP] (110)
当我运行上面相同的命令时。我可以打开服务器
64 bytes from [S
我已经在DebianLenny5.0上安装了一个MySQL数据库,并试图使用PHP远程连接到该数据库。
这就是我登录的方式:
$con = mysql_pconnect("MY_IP_ADDRESS","root","MY_PASSWORD");
if (!$con)
die('Could not connect: ' . mysql_error());
这就是我遇到的错误:
Could not connect: Access denied for user 'root'@'li273-10.members