쪼물락 비젼 AI
MariaDB mysql
ZEROWIN.ART
2020. 10. 28. 18:08
728x90
mysql -u root
use mysql codebot;
grant all privileges on*.* to 'root'@'%';
select host,user, password from user;
flush privileges;
root@neutis-n5:/# find . -name my.cnf
./etc/my.cnf
cat /etc/my.cnf
root@neutis-n5:~# sudo cat /etc/my.cnf
[client]
#password = password
port = 3306
socket = /var/lib/mysql/mysql.sock
default-character-set = utf8mb4
[mysql]
default-character-set = utf8mb4
[mysqld_safe]
[mysqld]
collation-server = utf8mb4_unicode_ci
init-connect = 'SET NAMES utf8mb4'
character-set-server = utf8mb4
user = mysql
port = 3306
socket = /var/lib/mysql/mysql.sock
pid-file = /var/lib/mysql/mysqld.pid
log-error = /var/log/mysqld.err
basedir = /usr
datadir = /var/lib/mysql
skip-external-locking
skip-networking
#ignore-builtin-innodb
#default-storage-engine = myisam
default-storage-engine = InnoDB
#bind-address = localhost
MariaDB [codebot]> show tables;
+-------------------+
| Tables_in_codebot |
+-------------------+
| action |
| mission |
| user |
+-------------------+
3 rows in set (0.00 sec)
MariaDB [codebot]> explain mission
-> ;
+------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+---------------------+------+-----+---------+-------+
| user_id | int(10) unsigned | YES | MUL | NULL | |
| map_id | int(10) unsigned | NO | | NULL | |
| mission_id | int(10) unsigned | NO | | NULL | |
| clear | tinyint(3) unsigned | NO | | NULL | |
| score | int(10) unsigned | NO | | NULL | |
+------------+---------------------+------+-----+---------+-------+
5 rows in set (0.00 sec)
MariaDB [codebot]> show action;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'action' at line 1
MariaDB [codebot]> select * from action;
+----+---------+--------+------------+---------+--------+
| id | user_id | map_id | mission_id | success | reason |
+----+---------+--------+------------+---------+--------+
| 1 | 1 | 0 | 0 | 1 | 0 |
| 2 | 1 | 0 | 1 | 1 | 6 |
| 3 | 1 | 0 | 2 | 1 | 6 |
| 4 | 1 | 0 | 3 | 1 | 6 |
+----+---------+--------+------------+---------+--------+
4 rows in set (0.00 sec)
MariaDB [codebot]> select * from mission;
+---------+--------+------------+-------+-------+
| user_id | map_id | mission_id | clear | score |
+---------+--------+------------+-------+-------+
| 1 | 0 | 0 | 1 | 10 |
| 1 | 0 | 1 | 1 | 5 |
| 1 | 0 | 2 | 1 | 5 |
| 1 | 0 | 3 | 1 | 5 |
| 1 | 0 | 4 | 0 | 0 |
| 1 | 1 | 0 | 0 | 0 |
| 1 | 1 | 1 | 0 | 0 |
| 1 | 1 | 2 | 0 | 0 |
| 1 | 1 | 3 | 0 | 0 |
| 1 | 1 | 4 | 0 | 0 |
| 1 | 2 | 0 | 0 | 0 |
| 1 | 2 | 1 | 0 | 0 |
| 1 | 2 | 2 | 0 | 0 |
| 1 | 2 | 3 | 0 | 0 |
| 1 | 2 | 4 | 0 | 0 |
| 2 | 0 | 0 | 0 | 0 |
| 2 | 0 | 1 | 0 | 0 |
| 2 | 0 | 2 | 0 | 0 |
| 2 | 0 | 3 | 0 | 0 |
| 2 | 0 | 4 | 0 | 0 |
| 2 | 1 | 0 | 0 | 0 |
| 2 | 1 | 1 | 0 | 0 |
| 2 | 1 | 2 | 0 | 0 |
| 2 | 1 | 3 | 0 | 0 |
| 2 | 1 | 4 | 0 | 0 |
| 2 | 2 | 0 | 0 | 0 |
| 2 | 2 | 1 | 0 | 0 |
| 2 | 2 | 2 | 0 | 0 |
| 2 | 2 | 3 | 0 | 0 |
| 2 | 2 | 4 | 0 | 0 |
+---------+--------+------------+-------+-------+
30 rows in set (0.00 sec)
MariaDB [codebot]> select * from user;
+----+---------------+
| id | name |
+----+---------------+
| 1 | ì² ìˆ˜ |
| 2 | ì² ìˆ˜ |
+----+---------------+
2 rows in set (0.00 sec)
MariaDB [codebot]>
Reference
[TOOL] Mysql GUI 툴 설치부터 사용까지 - HeidiSQL
[TOOL] Mysql GUI 툴 설치부터 사용까지 - HeidiSQL 공식 홈페이지 : https://www.heidisql.com/ HeidiSQL 이란 ? HeidiSQL은 무료 소프트웨어이며 쉽게 배울 수있는 목표를 가지고 있습니다. "Heidi"를 사용하..
binshuuuu.tistory.com
dveamer.github.io/database/RemoteMariaDB.html
Dveamer
현실에서 살고 있지만 이상에 대한 꿈을 버리지 못한 몽상가의 홈페이지 입니다. 개인적인 기록을 주 목적으로 하며 일상과 프로그래밍 관련 글을 포스팅합니다.
dveamer.github.io