Setup MySQL
Contents
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.
loading...
About Hardono
Incoming Search
linux, nginx, ubuntu, wordpress