Home > How To, Raspberry pi, Technology > Adding Mysql to your Raspberry Pi webserver

Adding Mysql to your Raspberry Pi webserver

October 28, 2012 Leave a comment Go to comments

Whilst you can have a perfectly good website server without a database if you have followed this guide

How to setup a webserver with PHP on Raspberry Pi

You need a database to provide a way of holding data and is a requirement for many content management systems (CMS) and web-based applications

Mysql is the most popular database server and most third-party software for Linux is designed to use Mysql so to install on you raspberry pi type the following

sudo apt-get install mysql-server

During the install you will be asked to enter a password twice

(This password is for the setting up of your MySQL root password)

Once done you then need to type the following command to install the php mysql libraries to allow PHP to access the mysql database

sudo apt-get install php5-mysql

To test that you installed MySQL successfully we can run the following command

mysqladmin -u root -p ping

You will then need to enter the MySQL root password which you set when you installed the MySQL software

If successful you will see the below text.

——————————————————
pi@raspberrypi ~ $ mysqladmin -u root -p ping
Enter password:
mysqld is alive
——————————————————

Advertisements
  1. No comments yet.
  1. August 2, 2013 at 6:29 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

raspberrypicloud

The University of Glasgow's Raspberry Pi Project

Tech-o-rama

Your all round solution for tech problems (and some others things...like spelling errors)

thedomesticfringe.com/

telling stories - making memories

Raspberry Pi Kid

A 14-year old's adventures with Raspberry Pi

Naked Security

Computer Security News, Advice and Research

Grumpy IT Girl

I'm not a very good writer

Dustin Software

Because programming is fun!

Pinoy Tekkie

USER-FRIENDLY TECHNOLOGIES FOR THE PINOY NOOBIES

petRockBlog

Fun stuff for technics enthusiasts

I Kissed My Date Goodnight

A single thirty-something embarking on motherhood through the miracle of adoption.

projectz

Tech, Gadgets, Photography, Social Media and Poor Spelling

Programming My Rasberry Pi

A brave fool's adventures into the unknown!

Chris Ainger's Blog

Where Fishing Meets Computing

PIPAL

Information wants to be free

ITtechExec: Protecting Tech Careers Since 2001

Technical Career Advancement: Transformed. Guaranteed.

CRUNCHEDD

Entertainment, Technology, Social Media Updates from in Between the Web…

StartupTunes

An Exclusive Web 2.0 Startups Review Blog

The Life of Me

Just another IT blog

NJrajgelani

The Best Place for Deziners

%d bloggers like this: