Upgrading from MySQL 5.5 to MySQL 5.6 on Ubuntu 14.04

Published on

Make a backup of the data in your existing database. mysqldump –lock-all-tables -u root -p –all-databases > dump.sql Update, upgrade and install MySql 5.6. sudo apt-get update sudo apt-get upgrade sudo apt-get install mysql-server-5.6 If you get a message like the following: The following packages have unmet dependencies: mysql-server-5.6 : Depends: mysql-client-5.6 (>= 5.6.31-0ubuntu0.14.04.2) but … Continue reading Upgrading from MySQL 5.5 to MySQL 5.6 on Ubuntu 14.04

Large MySQL Data Imports

Published on

Disable MySQL indexes MySQL can import many rows with a single disk write. It makes the import go many times faster and minimizes the impact on other customers. Database files created with phpMyAdmin or mysqldump already contain commands to disable the indexes. To disable MySQL indexes: Add these commands before the import starts: ALTER TABLE … Continue reading Large MySQL Data Imports

MySQL Joins

Published on

LEFT JOIN SELECT * FROM customers LEFT JOIN books ON customers.book_id = books.id RIGHT JOIN SELECT * FROM customers RIGHT JOIN books ON customers.book_id = books.id OUTER JOIN SELECT * FROM customers OUTER JOIN books ON customers.book_id = books.id INNER JOIN(or simply JOIN) SELECT * FROM customers JOIN books ON customers.book_id = books.id LEFT JOIN … Continue reading MySQL Joins

Setting Up a LAMP Server on Ubuntu 14.04

Published on

Update server. sudo apt-get update sudo apt-get upgrade Install git. sudo apt-get install git Install MySQL. sudo su apt-get install mysql-server mysql-client Install Apache2. apt-get install apache2 Install PHP (To search for PHP packages: apt-cache search php5). apt-get install php5 apt-get install libapache2-mod-php5 apt-get install php5-mysql apt-get install php5-curl apt-get install php5-gd apt-get install php5-intl … Continue reading Setting Up a LAMP Server on Ubuntu 14.04