Ubuntu 18.04 : MySQL 5.7.23 ÄÄÆÄÀÏ, ¼³Ä¡
Ãâó
Ubuntu server¿¡ mysql 5.5.x ¼³Ä¡Çϱâ -pupustory@- - Tistory
[Linux/CentOS] MysqlÀ» ÄÄÆÄÀÏÇؼ ¼³Ä¡Çغ¸ÀÚ - AT BLOG
¸®´ª½º Á¤º¸ Á¶È¸
Ãâó : ¸®´ª½º Á¾·ù È®ÀÎ, ¸®´ª½º ¹öÀü È®ÀÎ - Á¦Å¸À§Å°
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"
NAME="Ubuntu"
VERSION="14.04.3 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.3 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
¸®´ª½º ºñÆ® È®ÀÎ
Ãâó : ¸®´ª½º 32ºñÆ® 64ºñÆ® È®ÀÎ - Á¦Å¸À§Å°
64
°ü·ÃÆÐÅ°Áö ¼³Ä¡
MySQL °èÁ¤ ¸¸µé±â
cmake ¼³Ä¡
MySQL ¼Ò½º ´Ù¿î·Îµå, ¾ÐÃàÇØÁ¦, ÄÄÆÄÀÏ, ¼³Ä¡
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql57 \
-DMYSQL_DATADIR=/usr/local/mysql57/data \
-DMYSQL_UNIX_ADDR=/usr/local/mysql57/mysql.sock \
-DSYSCONFDIR=/usr/local/mysql57 \
-DMYSQL_TCP_PORT=3306 \
-DMYSQL_USER=mysql \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_EXTRA_CHARSETS=all \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DDOWNLOAD_BOOST=0 -DWITH_BOOST=./boost
ȯ°æ¼³Á¤
[mysqld] # port=3306 # basedir=/usr/local/mysql57 # datadir=/usr/local/mysql57/data # pid-file=/usr/local/mysql57/mysqld.pid # log_error=/usr/local/mysql57/mysql_error.log # lc-messages-dir=/usr/local/mysql57/share init_connect=SET collation_connection = utf8_general_ci init_connect=SET NAMES utf8 character-set-server=utf8 collation-server=utf8_general_ci # table_cache=1024 max_connections=2048 max_user_connections=500 max_connect_errors=10000 wait_timeout=300 query_cache_type = 1 query_cache_size = 128M query_cache_limit = 5M slow_query_log long_query_time=3 max_allowed_packet=16M sort_buffer_size = 2M # skip-innodb skip-name-resolve sql_mode = STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION [mysql] default-character-set=utf8 [client] default-character-set=utf8
MySQL ¼³Ä¡ µð·ºÅ丮 mysql °èÁ¤À¸·Î ±ÇÇÑ ¼öÁ¤
MySQL µ¥ÀÌÅͺ£À̽º ÃʱâÈ (mysql °èÁ¤À¸·Î ½ÇÇà)
2018-10-03 15:26:47 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
2018-10-03 15:26:47 [NOTE] Creating data directory /usr/local/mysql57/data
2018-10-03 15:26:47 [NOTE] Generating random password to /home/mysql/.mysql_secret...done.
2018-10-03 15:26:47 [NOTE] Executing /usr/local/mysql57/bin/mysqld --no-defaults --bootstrap --datadir=/usr/local/mysql57/data --lc-messages-dir=/usr/local/mysql57/share --lc-messages=en_US --basedir=/usr/local/mysql57
2018-10-03 15:26:48 [NOTE] Creating system tables...done.
2018-10-03 15:26:48 [NOTE] Filling system tables with data...done.
2018-10-03 15:26:49 [NOTE] Filling help table with data...done.
2018-10-03 15:26:49 [NOTE] Creating user for internal session service...done.
2018-10-03 15:26:49 [NOTE] Creating default user root@localhost
2018-10-03 15:26:49 [NOTE] Creating default proxy root@localhost
2018-10-03 15:26:49 [NOTE] Creating sys schema
2018-10-03 15:26:49 [NOTE] done.
2018-10-03 15:26:51 [WARNING] The bootstrap log isn't empty:
2018-10-03 15:26:51 [WARNING] 2018-10-03T06:26:47.586650Z 0 [Warning] --bootstrap is deprecated. Please consider using --initialize instead
2018-10-03 15:26:51 [NOTE] Generating SSL Certificates
MySQL ¼ºñ½º µî·Ï
¼ºñ½º mysqld ÆÄÀÏ º¹»ç
mysqld ¼öÁ¤
mysqldÆÄÀÏÀ» ¿¾î¼ basedir¿¡ mysqlÀÌ ¼³Ä¡µÈ µð·ºÅ丮¿Í µ¥ÀÌÅÍ µð·ºÅ丮(datadir)¸¦ ¼³Á¤ÇÑ´Ù.
basedir=/usr/local/mysql57 datadir=/usr/local/mysql57/data
mysqld ¼ºñ½º µî·Ï
mysqld ¼ºñ½º ½ÇÇà
¡Ü mysqld57.service - LSB: start and stop MySQL
Loaded: loaded (/etc/init.d/mysqld57; generated)
Active: active (running) since Wed 2018-10-03 15:37:07 KST; 6min ago
Docs: man:systemd-sysv-generator(8)
Process: 1042 ExecStart=/etc/init.d/mysqld57 start (code=exited, status=0/SUCCESS)
Tasks: 28 (limit: 4915)
CGroup: /system.slice/mysqld57.service
¦§¦¡1071 /bin/sh /usr/local/mysql57/bin/mysqld_safe --datadir=/usr/local/mysql57/data --pid-file=/usr/local/mysql57/data/bluesa
¦¦¦¡1469 /usr/local/mysql57/bin/mysqld --basedir=/usr/local/mysql57 --datadir=/usr/local/mysql57/data --plugin-dir=/usr/local/m
10¿ù 03 15:37:06 bluesanta-ubuntu systemd[1]: Starting LSB: start and stop MySQL...
10¿ù 03 15:37:06 bluesanta-ubuntu mysqld57[1042]: Starting MySQL
10¿ù 03 15:37:07 bluesanta-ubuntu mysqld57[1042]: . *
10¿ù 03 15:37:07 bluesanta-ubuntu systemd[1]: Started LSB: start and stop MySQL.
root ¾ÏÈ£ ÃʱâÈ
[1] 21756
mysql@bluesanta-ubuntu:/usr/local/mysql57$ 2018-10-03T06:32:29.844112Z mysqld_safe Logging to '/usr/local/mysql57/data/bluesanta-ubuntu.err'.
2018-10-03T06:32:29.873395Z mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql57/data
mysql@bluesanta-ubuntu:/usr/local/mysql57$ bin/mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.7.23-log Source distribution Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> use mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> update user set authentication_string = password('sqldba') where user = 'root'; Query OK, 1 row affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 1 mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> quit Bye
ERROR 1820 (HY000) ¿À·ù ÇØ°á
mysql> select 1; ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. mysql> SET PASSWORD = PASSWORD('sql'); Query OK, 0 rows affected, 1 warning (0.00 sec) mysql$gt; select 1; +---+ | 1 | +---+ | 1 | +---+ 1 row in set (0.00 sec) mysql>
»ç¿ëÀÚ Ãß°¡
mysql> create user 'user1'@'%' identified by 'userpw'; mysql> grant all privileges on *.* to 'user1'@'%' with grant option; mysql> flush privileges;
»ç¿ëÀÚ Ãß°¡
create user 'terecal'@'%' identified by '****'; GRANT ALL privileges ON terecal_db.* TO 'terecal'@'%'; flush privileges;
Ãâó: http://bluexmas.tistory.com/870?category=130687 [ÆĶõÅ©¸®½º¸¶½º]