Frontend Ajax call not working using wp_ajax, wp_enqueue_script and wp_localize_script

Look at the top of your generated HTML source code. Are you seeing something like this:

<script type="text/javascript">
/* <![CDATA[ */
var MyAjax = {"ajaxurl":"http:\/\/localboast\/home\/wp2\/wp-admin\/admin-ajax.php"};
/* ]]> */
</script>

wp_localize_script now escapes whatever you pass into it. So that the problem I have.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)