昨日、GUI開発に関して彼らが提供するものの外観が好きなので、agiletoolkitをインストールしました。
残念ながら、MySQLデータベースに接続できませんでした。
SQLException
Database connection failed
MySQL error:
php_network_getaddresses: getaddrinfo failed: No such host is known.
私のconfig.phpで私は分離しました
$config['dsn']='mysql://root:root:3307@localhost/agiletoolkit_examples';
私はDBlite.phpを見て、そのファイルに$dsn_aという変数をダンプするように指示しました。。。
array
'database' => string 'agiletoolkit_examples' (length=21)
'body' => string 'root:root:3307@localhost' (length=24)
'type' => string 'mysql' (length=5)
'port' => string 'root' (length=4)
'hostspec' => string 'root' (length=4)
これは私には正しく見えません。。。ポートとして「root」を割り当てています。
ベリー、迅速な対応に感謝します。
私は最初に試しました...
$config['dsn']='mysql://root:root@localhost:3307/agiletoolkit_examples';
しかし、次のエラーが発生しました:
SQLException
Database connection failed
MySQL error:
No connection could be made because the target machine actively refused it.
およびvar_dumpの次の出力:
dsn_a:
array
'database' => string 'agiletoolkit_examples' (length=21)
'body' => string 'root:root@localhost:3307' (length=24)
'type' => string 'mysql' (length=5)
'port' => string '3307' (length=4)
'hostspec' => string 'localhost' (length=9)
'transport' => string '' (length=0)
'password' => string 'root' (length=4)
'username' => string 'root' (length=4)
...より適切にマッピングされているように見えますが、機能しません。
それで、私はドキュメントを参照して、これを見つけました:
$config['dsn']='mysql://user:password@localhost/dbname';
// define port:
// $config['dsn']='mysql://user:password:8888@localhost/dbname';
// through socket
// $config['dsn']='mysql://user:password:/tmp/sock@localhost/dbname';
そしてこれ(配列を介したアクセスの定義):
If the DSN string is impossible to define - for example, if your password contains the '@' character - then this alternative format is preferred:
$config['dsn']=array(
'hostspec'=>'localhost:1234',
'username'=>'dbuser',
'password'=>'secret' );
// Arguments passed to mysql_connect as
// mysql_connect('localhost:1234','dbuser','secret');
codeIgniter、yii、およびすべてのアプリが正常に動作するため、mysqlのインストールに問題はないと思います。
同様の問題を抱えているユーザーはいますか?
ご協力いただきありがとうございます