728x90
반응형
# mysql 패스워드 변경
# mysql_upgrade -u root -p The mysql_upgrade client is now deprecated. The actions executed by the upgrade cli ent are now done by the server. To upgrade, please start the new MySQL binary with the older data directory. Repair ing user tables is done automatically. Restart is not required after upgrade. The upgrade process automatically starts on running a new MySQL binary with an olde r data directory. To avoid accidental upgrades, please use the --upgrade=NONE optio n with the MySQL binary. The option --upgrade=FORCE is also provided to run the ser ver upgrade sequence on demand. It may be possible that the server upgrade fails due to a number of reasons. In tha t case, the upgrade sequence will run again during the next MySQL server start. If the server upgrade fails repeatedly, the server can be started with the --upgrade=M INIMAL option to start the server without executing the upgrade sequence, thus allo wing users to manually rectify the problem. root@ubuntu:~# # mysql -u root -popenstack -h 192.168.56.30 mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.35-0ubuntu0.22.04.1 (Ubuntu) Copyright (c) 2000, 2023, Oracle and/or its affiliates. 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> # mysql -uroot -popenstack mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 Server version: 8.0.35-0ubuntu0.22.04.1 (Ubuntu) Copyright (c) 2000, 2023, Oracle and/or its affiliates. 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> GRANT ALL PRIVILEGES ON keystone.* TO 'root'@'%'; Query OK, 0 rows affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%'; Query OK, 0 rows affected (0.00 sec) mysql> mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) # MYSQL_PWD="openstack" mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 14 Server version: 8.0.35-0ubuntu0.22.04.1 (Ubuntu) Copyright (c) 2000, 2023, Oracle and/or its affiliates. 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> # mysql_config_editor set --login-path=root --host=localhost --user=root --password --port=3306 Enter password: # mysql -u root -popenstack -h 192.168.56.30 mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 15 Server version: 8.0.35-0ubuntu0.22.04.1 (Ubuntu) Copyright (c) 2000, 2023, Oracle and/or its affiliates. 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>
# mysql 환경정보 /etc/mysql/my.cnf
# cat /etc/mysql/my.cnf # # The MySQL database server configuration file. # # !includedir /etc/mysql/conf.d/ !includedir /etc/mysql/mysql.conf.d/ [mysqld] max_connections = 1024 default-storage-engine = InnoDB sql_mode = TRADITIONAL #bind-address = 0.0.0.0 bind-address = 192.168.56.30
# mysql 서버 IP 지정하여 접속하기
$ mysql -u root -popenstack -h 192.168.56.30 mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 14 Server version: 8.0.35-0ubuntu0.22.04.1 (Ubuntu) Copyright (c) 2000, 2023, Oracle and/or its affiliates. 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>
# mysql 상태 조회
mysql> status -------------- mysql Ver 8.0.35-0ubuntu0.22.04.1 for Linux on x86_64 ((Ubuntu)) Connection id: 16 Current database: Current user: root@192.168.56.30 SSL: Cipher in use is TLS_AES_256_GCM_SHA384 Current pager: stdout Using outfile: '' Using delimiter: ; Server version: 8.0.35-0ubuntu0.22.04.1 (Ubuntu) Protocol version: 10 Connection: 192.168.56.30 via TCP/IP Server characterset: utf8mb4 Db characterset: utf8mb4 Client characterset: utf8mb4 Conn. characterset: utf8mb4 TCP port: 3306 Binary data as: Hexadecimal Uptime: 10 min 47 sec Threads: 2 Questions: 16 Slow queries: 0 Opens: 122 Flush tables: 3 Open tables: 41 Queries per second avg: 0.024 --------------
# mysql 재기동, 상태정보
# netstat -ntpa |grep LISTEN tcp 0 0 192.168.56.30:3306 0.0.0.0:* LISTEN 12777/mysqld
# service --status-all [ + ] mysql [ + ] postgresql
# service mysql status ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2024-01-06 14:00:34 KST; 3h 12min ago Process: 12768 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS) Main PID: 12777 (mysqld) Status: "Server is operational" Tasks: 38 (limit: 4537) Memory: 366.1M CGroup: /system.slice/mysql.service └─12777 /usr/sbin/mysqld
# 오픈스텍 설치후 mysql DB를 윈도우에서 접속 방법
- MYSQL 접속툴인 HeidiSQL 설치
https://www.heidisql.com/download.php
# HeidiSQL 실행후 다음과 같이 설정함
- 호스트명 / ip : 서버 ip
- 포트 : 3306
- 사용자 /암호
728x90
반응형
LIST
'서버가상화 > openstack' 카테고리의 다른 글
openstack RabbitMQ 설치(메시지 Queus) (0) | 2024.01.06 |
---|---|
openstak 오류(Missing value auth-url required for auth plugin password) (0) | 2024.01.06 |
04 openstack 인스턴스 생성 (0) | 2024.01.02 |
01 openstack 설치하기(★★★) (0) | 2023.12.31 |
02 openstack 설치정보 (0) | 2023.12.30 |