browse by category or date

Setup MySQL

To install MySQL, run the following command:

sudo -i
apt-get update
apt-get install mysql-server

MySQL will prompt you to enter the root password. Write it down, or save the password somewhere in case you forget.

Once the installation completed, login to MySQL

mysql -u root -p

You’ll be prompted for password. Use the same password as you set in installation step.

At the mysql> prompt, run these commands, replacing NEW_PASSWORD with a password of your own

CREATE DATABASE wordpress;
GRANT ALL PRIVILEGES ON wordpress.* 
TO "wp_user"@"localhost" IDENTIFIED BY "NEW_PASSWORD";
FLUSH PRIVILEGES;
EXIT

Now let’s create a custom configuration file to cater the RAM size limitation in EC2 Micro.

vim /etc/mysql/conf.d/ec2.cnf

Press i to make Vim enter edit mode. Paste below code by mouse right-click

[mysqld]
key_buffer = 12M
query_cache_size = 0
table_cache = 32

ignore_builtin_innodb
default_storage_engine=MyISAM

Press Esc key to return to read mode. Press !wq to save the file.

Alright, that’s all for MySQL portion.

GD Star Rating
loading...
How To Migrate Your WordPress Blog from GoDaddy Shared Hosting To Amazon EC2 Micro, 5.0 out of 5 based on 1 rating

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Incoming Search

linux, nginx, ubuntu, wordpress

1 Trackback

 

No Comment

Add Your Comment