PHP Connection failed: SQLSTATE[HY000] [2002] Connection refused

I found the reason why the connection was not working, it was because the connection was trying to connect to port 8888, when it needed to connect to port 8889. This fixed the problem, although changing the server name to localhost still gives the error. Connection failed: SQLSTATE[HY000] [2002] No such file or directory But … Read more

MySQL: Access denied for user ‘test’@’localhost’ (using password: YES) except root user

I am facing problem with mysql non root/admin user, I am following the below steps for creating user and its privileges, correct me if i am doing wrong, i am installing mysql on RHEL 5.7 64bit, packages are mentioned below, once i done the rpm install we are creating mysql db using mysql_install_db, then starting the mysql service then using mysql_upgrade also we … Read more

Install mysql-python (Windows)

You’re going to want to add Python to your Path Environment Variable in this way. Go to: My Computer System Properties Advance System Settings Under the “Advanced” tab click the button that says “Environment Variables” Then under System Variables you are going to want to add / change the following variables: PYTHONPATH and Path. Here is a paste … Read more

What does SQL Select symbol || mean?

|| represents string concatenation. Unfortunately, string concatenation is not completely portable across all sql dialects: ansi sql: || (infix operator) mysql: concat ( vararg function ). caution: || means ‘logical or’ (It’s configurable, however; thanks to @hvd for pointing that out) oracle: || (infix operator), concat ( caution: function of arity 2 only ! ) postgres: || (infix operator) sql server: + (infix operator), concat ( vararg function ) sqlite: || (infix operator) hopefully the confusion is complete … Read more

MySQL ERROR 1045 (28000): Access denied for user ‘bill’@’localhost’ (using password: YES)

You probably have an anonymous user ”@’localhost’ or ”@’127.0.0.1′. As per the manual: When multiple matches are possible, the server must determine which of them to use. It resolves this issue as follows: (…) When a client attempts to connect, the server looks through the rows [of table mysql.user] in sorted order. The server uses the first row that matches the … Read more

PHP Connection failed: SQLSTATE[HY000] [2002] Connection refused

I found the reason why the connection was not working, it was because the connection was trying to connect to port 8888, when it needed to connect to port 8889. This fixed the problem, although changing the server name to localhost still gives the error. Connection failed: SQLSTATE[HY000] [2002] No such file or directory But … Read more