{"action":"closed","issue":{"url":"https://api.github.com/repos/sysown/proxysql/issues/609","repository_url":"https://api.github.com/repos/sysown/proxysql","labels_url":"https://api.github.com/repos/sysown/proxysql/issues/609/labels{/name}","comments_url":"https://api.github.com/repos/sysown/proxysql/issues/609/comments","events_url":"https://api.github.com/repos/sysown/proxysql/issues/609/events","html_url":"https://github.com/sysown/proxysql/issues/609","id":165785308,"number":609,"title":"Very odd behavior when using mysql_select_db in PHP","user":{"login":"sschueller","id":1180107,"avatar_url":"https://avatars.githubusercontent.com/u/1180107?v=3","gravatar_id":"","url":"https://api.github.com/users/sschueller","html_url":"https://github.com/sschueller","followers_url":"https://api.github.com/users/sschueller/followers","following_url":"https://api.github.com/users/sschueller/following{/other_user}","gists_url":"https://api.github.com/users/sschueller/gists{/gist_id}","starred_url":"https://api.github.com/users/sschueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sschueller/subscriptions","organizations_url":"https://api.github.com/users/sschueller/orgs","repos_url":"https://api.github.com/users/sschueller/repos","events_url":"https://api.github.com/users/sschueller/events{/privacy}","received_events_url":"https://api.github.com/users/sschueller/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"renecannao","id":3645227,"avatar_url":"https://avatars.githubusercontent.com/u/3645227?v=3","gravatar_id":"","url":"https://api.github.com/users/renecannao","html_url":"https://github.com/renecannao","followers_url":"https://api.github.com/users/renecannao/followers","following_url":"https://api.github.com/users/renecannao/following{/other_user}","gists_url":"https://api.github.com/users/renecannao/gists{/gist_id}","starred_url":"https://api.github.com/users/renecannao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renecannao/subscriptions","organizations_url":"https://api.github.com/users/renecannao/orgs","repos_url":"https://api.github.com/users/renecannao/repos","events_url":"https://api.github.com/users/renecannao/events{/privacy}","received_events_url":"https://api.github.com/users/renecannao/received_events","type":"User","site_admin":false},"assignees":[{"login":"renecannao","id":3645227,"avatar_url":"https://avatars.githubusercontent.com/u/3645227?v=3","gravatar_id":"","url":"https://api.github.com/users/renecannao","html_url":"https://github.com/renecannao","followers_url":"https://api.github.com/users/renecannao/followers","following_url":"https://api.github.com/users/renecannao/following{/other_user}","gists_url":"https://api.github.com/users/renecannao/gists{/gist_id}","starred_url":"https://api.github.com/users/renecannao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renecannao/subscriptions","organizations_url":"https://api.github.com/users/renecannao/orgs","repos_url":"https://api.github.com/users/renecannao/repos","events_url":"https://api.github.com/users/renecannao/events{/privacy}","received_events_url":"https://api.github.com/users/renecannao/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2016-07-15T13:21:02Z","updated_at":"2016-07-22T09:40:55Z","closed_at":"2016-07-22T09:40:55Z","body":"When I run the following php script via PHP-CLI (<7.0.0) through proxysql (1.2.0j) I get `mysql_select_db()` to only work twice. Connection to proxysql is via socket (php.ini:mysql.default_socket=/var/run/proxysql/proxysql.sock). When connecting to the mariaDB socket directly it works fine.\r\n\r\n```\r\n<?php\r\n\r\n$host = '127.0.0.1';\r\n$user = 'username';\r\n$pass = 'password';\r\n\r\n$db1 = 'db1';\r\n$db2 = 'db2';\r\n\r\necho \"Opening connection: \" . $Host . \"\\n\";\r\n$db = mysql_connect($Host, $user, $pass);\r\n\r\n// this works ok\r\necho \"Selecting DB: \" . $db1 . \"\\n\";\r\nmysql_select_db($db1, $db);\r\necho \"Actual DB: \" . @mysql_result(mysql_query(\"SELECT DATABASE();\"), 0) . \"\\n\";\r\n\r\n// this also works ok\r\necho \"Selecting DB: \" . $db2 . \"\\n\";\r\nmysql_select_db($db2, $db);\r\necho \"Actual DB: \" . @mysql_result(mysql_query(\"SELECT DATABASE();\"), 0) . \"\\n\";\r\n\r\n// this fails. $db2 is still selected\r\necho \"Selecting DB: \" . $db1 . \"\\n\";\r\nmysql_select_db($db1, $db);\r\necho \"Actual DB: \" . @mysql_result(mysql_query(\"SELECT DATABASE();\"), 0) . \"\\n\";\r\n```\r\n\r\nAny suggestions what could be causing this? I realize that `mysql_select_db()` is depricated and has been removed in php 7+ however it would be great it we could get this to work.\r\n\r\nThanks"}}
{"actor":{"display_login":"renecannao"}}