Best Webhosts

Convert mysql database charset to utf8

0
<code>

mysql –database=DATABASENAME -u USERNAME -p -B -N -e “SHOW TABLES” | awk ‘{print “ALTER TABLE”, $1, “CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;”}’

<code/>

This will bring an output like: which you can just run in as an sql command under your phpmyadmin:

 ALTER TABLE eaglesystems_config CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_ES_listings_allowed_fields CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_ES_listings_categories CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_ES_listings_config CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_ES_listings_updates CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_ES_message_template CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_ES_plugins_config CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_ES_users_friends CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_ES_users_messages CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_advanced_gallery_conf CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_announce_flag CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_announce_read CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_announcement_flags CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_announcements CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_banner_types CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_banners CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_banners_categories CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_banners_locations CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_blog CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_blog_categories CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_blog_categories_lookup CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_blog_comments CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_blog_followers CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_cancellations CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_captchas CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_categories CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_categories_fields CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_categories_related CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_classifieds CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_classifieds_images CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_contact_requests CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_cron CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_cron_log CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_discount_codes CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_documents CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_email_campaigns CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_email_lists CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_email_lists_lookup CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_email_log CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_email_marketing CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_email_marketing_queue CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_email_queue CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_email_schedules CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_email_templates CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_error_log CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_exports CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_faq_categories CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_faq_questions CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_favorites CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_feeds_external CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_fields CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_fields_groups CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_gateways CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_gateways_log CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_image_flags CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_images CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_imports CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_invoices CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_ip_limits CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_language_phrases CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_languages CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_listings CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_listings_categories CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_listings_claims CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_listings_suggestions CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_locations CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_log CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_log_sql CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_maxmind_blocks CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_maxmind_location CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_memberships CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_menu_links CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_messages CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_messages_posts CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_orders CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_pages CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_plugins CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_products CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_products_groups CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_products_pricing CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_ratings CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_ratings_categories CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_redirects CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_reviews CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_reviews_comments CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_reviews_quality CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_search_log CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_sessions CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_settings CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_site_links CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_sms_gateways CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_statistics CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_statistics_raw CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_tax CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_temp_language_phrases CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_templates CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_templates_data CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_transactions CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_updates CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_upgrades CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_users CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_users_api_keys CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_users_cards CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_users_groups CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_users_groups_lookup CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_users_groups_permissions_lookup CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_users_login_fails CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_users_login_providers CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_users_permissions CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE pmd_v1_zip_data CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

Google SMTP mail Internal Server Error

0

If you decided to use Google as your mail server and already set up it in a way like:

  1. Set the SMTP server name to smtp.gmail.com
  2. Set the username to your google email address
  3. Enter your password
  4. Set SMTP Port to 465
  5. Set SMTP Encryption to TLS

 

yet when I tried to send email I was receiving “internal server error ” msgs.

In the error log I see “Premature header…”

After spending hours on research I found that on your server you should have outgoing port 465 not blocked by the firewall.

MySQL: Repair & Optimize all Tables in all Databases

0

MySQL tables can crash quite easily, especially when your server unexpectedly shuts down or crashed, or when you're forced to copy data around when it's still being accessed.

Luckily, there's a simple command to automatically check, repair and optimize all tables in all databases when you're running a MySQL server on Linux / Unix / BSD.

mysqlcheck -u root -p --auto-repair --check --optimize --all-databases

That's all there is to it!

Best Webhost

9

Are you looking to create a website and have your own webhost? It is very simple but the first step is to find a dependable webhost company. We tried over 10 webhost companies (Servage, GoDaddy, Hostmonster, Blue host and may more) in the past 8 years and found the most affordable and dependable was DreamHost

There is nothing to loose you always have your 97 days money back grantee but further if you use our promo coupon you can take 90 USD OFF just use promotional discount coupon code: 

 

GIVE90GIFT

 

 

That gives you a One Year webhost for only 29.40 bucks.

Below is a table comparing popular webhosts and any hidden limtations they have. If you have updates to this please comment.

Feature Dreamhost Hostmonster GoDaddy (Delux)
Price/Month $8.95 $6.95 $6.99
Price Promo 1yr $107.4-90=$17.4 /first year Adhoc 5.95$x12=$71.4 $6.64×12=$79.68
Host Unlmited Domains Yes Yes Yes
Hosting Space Unlimited “Unlimited” but if high your account will be suspended 150GB
Bandwidth Unlimited Unlimited 1500GB
SSH Access By Default Need to send ID Can be requested no ID needed
CPU Limit No Limitation 60Sec then Site suspended No Limitation
Uptime 99.9 99.9 99.9
MYSQL Databases Unlimited 100 25
Email Accounts Unlimited Unlimited Unlimited
First Yr Domain Registration Free Yes Yes No
Custom Cronjob Yes Yes Yes
Tech Support Chat, Email Ticket system(response time: 1-24hours),Phone: only call back Phone, Chat, Ticket(Response time 1-24 Hours) Phone,Ticket(slow 1 Day response time)
Install Custom PHP Yes Simple see article here No No
FFMPEG Yes No No
Max File Upload Size 7MB, unlimited with Custom PHP install 2MB, can be increased with copying php to all folders, still limited with CPU time limit 7MB
Can host Adult Content Yes No Yes
Loading speed for a 64kb website size 2-3 Seconds performance is stable since dreamhost upgraded to new servers 2-3 Seconds, performance was stable 5-6 Seconds
Midnight Commander Installed by default Not installed and can not install it Not sure

How to increase UPLOAD MAX FILE SIZE for DREAMHOST?

2

This article is a slightly modified article from a great blog post at www.bluesunray.com about how to have our own php.ini with dreamhost.Thank you for your work:
0-Set up your domain for FastCGI (usually it is the case by default)
Login your Dreamhost, enter Manage Domains, Edit your domain setup, in Web Options->PHP mode, select ‘PHP 5 FastCGI’

  1. Download DreamHost Custom PHP.ini from DeamHost Scripts and Tips. Or attached here as of today dh-phpini
  2. Extract the dh-phpini.php from dh-phpini.zip and upload it to you website root.
  3. Open dh-phpini.php in you browse. Example: http://www.yoursite.com/dh-phpini.php.
  4. Then, this result shows,
  5. After install, this script create ‘cgi-bin’ folder in you website root, including ‘php.ini’ files in the folder, and add this lines in you .htaccess file, if they are not there already:

AddHandler fastcgi-script fcg fcgi fpl
AddHandler php-fastcgi .php
Action php-fastcgi /cgi-bin/dispatch.fcgi

6. Default, the Max upload file size increase to 20M, if you want to change to more, edit php.ini file in ‘cgi-bin’ folder like this,

post_max_size = 50M

upload_max_filesize = 50M

7.For changes to the new php.ini file to take effect , you’ll probably need to restart FastCGI for them to take effect.

Unfortunately you can’t do this from the Dreamhost Control Panel. You need to log in via SSH, and issue the command “killall -9 php5.cgi” to restart FastCGI.

Go to Top