Help us understand the problem. What is going on with this article?

mysql8.0.11を"とりあえず"立ち上げる

MySQL8.0リリース記念。
とりあえず立ち上げたので、メモ書き。


インストール先: /opt/mysql
DataDir: /var/lib/mysql
mysql実行ユーザ: mysql


[PATH追加]
~/.bashrc
PATH=$PATH:/opt/mysql/bin
# source ~/.bashrc
[tar展開とインストール]
# cd /opt
# tar zxvf /root/mysql-8.0.11-linux-glibc2.12-x86_64.tar.gz
# ln -s mysql-8.0.11-linux-glibc2.12-x86_64 mysql
# mysqld --initialize --user=mysql --basedir=/opt/mysql --datadir=/var/lib/mysql
# mysql_ssl_rsa_setup --datadir=/var/lib/mysql

---> root@localhostの初期パスワードが表示されるのでメモっておく

[systemd設定]
/etc/systemd/system/mysqld.service
[Unit]
Description=MySQL Server

[Service]
Type=simple
ExecStart=/opt/mysql/bin/mysqld
PIDFile=/var/lib/mysql/mysqld.pid
User=mysql
Restart=always

[Install]
WantedBy=multi-user.target
# systemctl enable mysqld
[my.cnf設定]
/etc/my.cnf
[mysqld]
basedir = /opt/mysql
datadir = /var/lib/mysql
pid_file = /var/lib/mysql/mysqld.pid
socket = /var/lib/mysql/mysql.sock
port = 3306

[client]
socket = /var/lib/mysql/mysql.sock
[mysql server 起動]
# systemctl start mysqld
# mysql -uroot -p

初期パスワードでログイン後、rootパスワードを変更しておく

[root password 変更]
mysql> set password = 'xxxxx';
mysql> flush privileges;
mysql> exit

文字コードやらメモリ設定やらは抜きにして、とりあえず起動するところまで♪

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした