MYSQL FAIL TO CONNECT TO DATATABLE EDITOR
MYSQL FAIL TO CONNECT TO DATATABLE EDITOR
hi and thank you for this lovely plugin
i downloaded editor datatable and i wan to run it in my wampserver
so here is what ive done so far
- first of all i installed all files in a folder named "datatable" and i run it in this http://localhost/datatables/examples/
- next i opend config file and i made this
$sql_details = array(
"type" => "Mysql", // Database type: "Mysql", "Postgres", "Sqlite" or "Sqlserver"
"user" => "root", // Database user name
"pass" => "", // Database password
"host" => "localhost", // Database host
"port" => "80", // Database connection port (can be left empty for default)
"db" => "test", // Database name
"dsn" => "" // PHP DSN extra information. Set as charset=utf8
if you are using MySQL
);
- after that i used this link "https://editor.datatables.net/examples/sql/mysql.sql" to fetch data to my database "test"
but i got this
{"sError":"An error occurred while connecting to the database 'test'. The error reported by the server was: SQLSTATE[HY000] [2006] MySQL server has gone away"}
do i miss something ??
and thanks
This question has an accepted answers - jump to answer
Answers
Sounds like your PHP and MySQL connection isn't working. Can you make a standard PDO SELECT request to your database from your PHP?
Allan
it works fine using a very simple query :
----- config.php -----i made this costum config to call a specifc database
but when i use the config of editor datatable in that case he couldn't connect to test database
I suspect this is the issue:
Are you really running your MySQL server on port 80? 3306 is the default, while 80 is used for HTTP servers.
Allan
thanks bro it's working now
it was the port = 3306 not port = 80 my mistake sorry