Tag: MySQL
-
Granting MySQL Permissions and Deleting them
Granting permissions in MySQL, localhost and external hosts must be separately run, the % sign means any external host and will not account for local connections: GRANT ALL PRIVILEGES ON *.* TO root@”localhost” IDENTIFIED BY ‘password’; GRANT ALL PRIVILEGES ON *.* TO root@”%” IDENTIFIED BY ‘password’; FLUSH PRIVILEGES; But say you wanted to then remove…
-
Solved: ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
I ran into this error on a RHEL machine that recently patched. To correct the issue, I recreated the symlink in /tmp : ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock service mysqld restart I found the solve and associated troubleshooting steps here: http://forums.cpanel.net/f354/cant-connect-local-mysql-server-through-socket-var-lib-mysql-mysql-sock-111-a-78444.html
-
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. The root cause was that: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. The root cause was that: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. CF can not open a TCP socket to the database server. Check that the database server is actually running, listening on…
-
WordPress URL change directly in MySQL
If you need to change the URL for a WordPress blog, and only have access via MySQL, you can use the following command, once you have selected the database. Keep in mind I am assuming the wp_ table prefix. UPDATE wp_options SET option_value=’http://www.example.com/’ WHERE option_name=’siteurl’ or option_name=’home’;
-
USPS character encoding issue for shipping in Miva Merchant
Some times I see strange characters when viewing the Shipping Options in a Miva Merchant store. This is because the characters are dependent on a character set. The way to correct this is to run the following command: update s02_USPSMethods set name = replace(name, ‘�’, ‘®’); It is semi safe to copy and paste the…