我有下面的php代码来连接到mysql。mysql_connect( "myserver.com" , "root", "redhat","datastore") or die(mysql_error()); Warning: mysql_connect(): Host '10.21.21.10' is not allowed to connect to this <
现在我的代码是在线的,但是我的数据库在localhost上(使用wamp)。我以前试过,它工作得很好。当我尝试执行代码时(它应该向数据库发送一个反馈),我得到了这个错误:这是我连接到我的数据库的方式:$bdd = new PDO('mysql:host=localhost;dbname=lexcelera', 'root',
当我想要连接到主机的数据库时出现错误,错误是No such file or directory,我查找套接字文件的路径,路径是/ var / run / mysqld /mysqld.sock,所以我更改了文件路径在本地,它的功能是我在网上有的解决方案,但在生产中没有DB_Connection = mysql
DB