wordpress……

Published by onesixx on

https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lemp-on-ubuntu-16-04

https://github.com/appkr/l5code/issues/4

install mysql

 

|➜ brew info mysql

버전 상관없이 설치

|➜  brew install mysql
...
==> /usr/local/Cellar/mysql/8.0.12/bin/mysqld 
      --initialize-insecure --user=onesixx --basedir=/usr/local/Cellar/mysql/8.0.
...

 

실행

로그인시에 수동으로 MySQL을 실행하려면 

|➜ mysql.server start

 

참고로 서비스로 등록하기 위해서는  

|➜ brew services start mysql

 

 

설정

root계정에 패스워드가 설정되어 있지않으므로, 

/usr/local/Cellar/mysql/8.0.12/bin|➜  mysql_secure_installation
Securing the MySQL server deployment.

Connecting to MySQL using a blank password.

VALIDATE PASSWORD COMPONENT can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD component?

Press y|Y for Yes, any other key for No: N
Please set the password for root here.

New password:

Re-enter new password:
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y
Success.


Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y
Success.

By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.


Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y
 - Dropping test database...
Success.

 - Removing privileges on test database...
Success.

Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y
Success.

All done!

 

MySQL은 기본적으로 localhost를 통해서만 설정이 가능하므로, 

mysql -uroot

 

 

mysql

 

CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

 

GRANT ALL ON wordpress.* TO 'wordpressuser'@'localhost' IDENTIFIED BY 'password';

 

FLUSH PRIVILEGES;

 

 

Step 2: Adjust Nginx’s Configuration to Correctly Handle

 

sudo nano /etc/nginx/sites-available/default

 

server {
    . . .

    location = /favicon.ico { log_not_found off; access_log off; }
    location = /robots.txt { log_not_found off; access_log off; allow all; }
    location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
        expires max;
        log_not_found off;
    }
    . . .
}

 

 

 

 

 

Categories: BLOG

onesixx

Blog Owner

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x